Skip to content

Reference

OpcDataTypes Members

Provides the identifiers of the data types of OPC UA and methods to map between .NET types, the members of OpcDataType and the identifiers of data types.

Reference

OpcDataTypes Members ​

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

Fields ​

Boolean ​

static

Identifies the Boolean data type.

csharp
public static readonly OpcNodeId Boolean
vbnet
Public Shared ReadOnly [Boolean] As OpcNodeId

Field value

OpcNodeId

Byte ​

static

Identifies the Byte data type.

csharp
public static readonly OpcNodeId Byte
vbnet
Public Shared ReadOnly [Byte] As OpcNodeId

Field value

OpcNodeId

ByteString ​

static

Identifies the ByteString data type.

csharp
public static readonly OpcNodeId ByteString
vbnet
Public Shared ReadOnly ByteString As OpcNodeId

Field value

OpcNodeId

DateTime ​

static

Identifies the DateTime data type.

csharp
public static readonly OpcNodeId DateTime
vbnet
Public Shared ReadOnly DateTime As OpcNodeId

Field value

OpcNodeId

DiagnosticInfo ​

static

Identifies the DiagnosticInfo data type.

csharp
public static readonly OpcNodeId DiagnosticInfo
vbnet
Public Shared ReadOnly DiagnosticInfo As OpcNodeId

Field value

OpcNodeId

Double ​

static

Identifies the Double data type.

csharp
public static readonly OpcNodeId Double
vbnet
Public Shared ReadOnly [Double] As OpcNodeId

Field value

OpcNodeId

EngineeringUnitInfo ​

static

Identifies the EUInformation data type.

csharp
public static readonly OpcNodeId EngineeringUnitInfo
vbnet
Public Shared ReadOnly EngineeringUnitInfo As OpcNodeId

Field value

OpcNodeId

Enumeration ​

static

Identifies the Enumeration data type.

csharp
public static readonly OpcNodeId Enumeration
vbnet
Public Shared ReadOnly Enumeration As OpcNodeId

Field value

OpcNodeId

ExpandedNodeId ​

static

Identifies the ExpandedNodeId data type.

csharp
public static readonly OpcNodeId ExpandedNodeId
vbnet
Public Shared ReadOnly ExpandedNodeId As OpcNodeId

Field value

OpcNodeId

Float ​

static

Identifies the Float data type.

csharp
public static readonly OpcNodeId Float
vbnet
Public Shared ReadOnly Float As OpcNodeId

Field value

OpcNodeId

Guid ​

static

Identifies the Guid data type.

csharp
public static readonly OpcNodeId Guid
vbnet
Public Shared ReadOnly Guid As OpcNodeId

Field value

OpcNodeId

Int16 ​

static

Identifies the Int16 data type.

csharp
public static readonly OpcNodeId Int16
vbnet
Public Shared ReadOnly Int16 As OpcNodeId

Field value

OpcNodeId

Int32 ​

static

Identifies the Int32 data type.

csharp
public static readonly OpcNodeId Int32
vbnet
Public Shared ReadOnly Int32 As OpcNodeId

Field value

OpcNodeId

Int64 ​

static

Identifies the Int64 data type.

csharp
public static readonly OpcNodeId Int64
vbnet
Public Shared ReadOnly Int64 As OpcNodeId

Field value

OpcNodeId

Integer ​

static

Identifies the Integer data type.

csharp
public static readonly OpcNodeId Integer
vbnet
Public Shared ReadOnly [Integer] As OpcNodeId

Field value

OpcNodeId

LocalizedText ​

static

Identifies the LocalizedText data type.

csharp
public static readonly OpcNodeId LocalizedText
vbnet
Public Shared ReadOnly LocalizedText As OpcNodeId

Field value

OpcNodeId

NodeId ​

static

Identifies the NodeId data type.

csharp
public static readonly OpcNodeId NodeId
vbnet
Public Shared ReadOnly NodeId As OpcNodeId

Field value

OpcNodeId

Number ​

static

Identifies the Number data type.

csharp
public static readonly OpcNodeId Number
vbnet
Public Shared ReadOnly Number As OpcNodeId

Field value

OpcNodeId

QualifiedName ​

static

Identifies the QualifiedName data type.

csharp
public static readonly OpcNodeId QualifiedName
vbnet
Public Shared ReadOnly QualifiedName As OpcNodeId

Field value

OpcNodeId

SByte ​

static

Identifies the SByte data type.

csharp
public static readonly OpcNodeId SByte
vbnet
Public Shared ReadOnly [SByte] As OpcNodeId

Field value

OpcNodeId

Status ​

static

Identifies the StatusCode data type.

csharp
public static readonly OpcNodeId Status
vbnet
Public Shared ReadOnly Status As OpcNodeId

Field value

OpcNodeId

String ​

static

Identifies the String data type.

csharp
public static readonly OpcNodeId String
vbnet
Public Shared ReadOnly [String] As OpcNodeId

Field value

OpcNodeId

UInt16 ​

static

Identifies the UInt16 data type.

csharp
public static readonly OpcNodeId UInt16
vbnet
Public Shared ReadOnly UInt16 As OpcNodeId

Field value

OpcNodeId

UInt32 ​

static

Identifies the UInt32 data type.

csharp
public static readonly OpcNodeId UInt32
vbnet
Public Shared ReadOnly UInt32 As OpcNodeId

Field value

OpcNodeId

UInt64 ​

static

Identifies the UInt64 data type.

csharp
public static readonly OpcNodeId UInt64
vbnet
Public Shared ReadOnly UInt64 As OpcNodeId

Field value

OpcNodeId

UInteger ​

static

Identifies the UInteger data type.

csharp
public static readonly OpcNodeId UInteger
vbnet
Public Shared ReadOnly [UInteger] As OpcNodeId

Field value

OpcNodeId

Value ​

static

Identifies the DataValue data type.

csharp
public static readonly OpcNodeId Value
vbnet
Public Shared ReadOnly Value As OpcNodeId

Field value

OpcNodeId

ValueRange ​

static

Identifies the Range data type.

csharp
public static readonly OpcNodeId ValueRange
vbnet
Public Shared ReadOnly ValueRange As OpcNodeId

Field value

OpcNodeId

XmlElement ​

static

Identifies the XmlElement data type.

csharp
public static readonly OpcNodeId XmlElement
vbnet
Public Shared ReadOnly XmlElement As OpcNodeId

Field value

OpcNodeId

Methods ​

GetArrayDimensions ​

static · 4 overloads

OverloadDescription
GetArrayDimensions<T>()static · since v2.9Determines the array dimensions of the type specified by T.
GetArrayDimensions<T>(T)static · since v2.9Determines the array dimensions of the value specified.
GetArrayDimensions(Type)static · since v2.18Determines the array dimensions of the type specified.
GetArrayDimensions(Type, object)static · since v2.18Determines the array dimensions of the value specified, or of the type specified if there is no value.

GetArrayDimensions<T>() ​

static · since v2.9

Determines the array dimensions of the type specified by T.

csharp
public static OpcArrayDimensions GetArrayDimensions<T>()
vbnet
Public Shared Function GetArrayDimensions(Of T)() As OpcArrayDimensions

Type parameters

NameDescription
TThe type whose array dimensions are to be determined.

Returns

OpcArrayDimensions

The array dimensions with the length 0 for each dimension if T is an array type; otherwise a null reference (Nothing in Visual Basic).

GetArrayDimensions<T>(T) ​

static · since v2.9

Determines the array dimensions of the value specified.

csharp
public static OpcArrayDimensions GetArrayDimensions<T>(T value)
vbnet
Public Shared Function GetArrayDimensions(Of T)(
    value As T) As OpcArrayDimensions

Type parameters

NameDescription
TThe type of the value.

Parameters

NameTypeDescription
valueTThe value whose array dimensions are to be determined.

Returns

OpcArrayDimensions

The lengths of the dimensions if the value is an array; the length 0 for each dimension if the type of the value, or T for a null reference (Nothing in Visual Basic), is an array type; otherwise a null reference.

GetArrayDimensions(Type) ​

static · since v2.18

Determines the array dimensions of the type specified.

csharp
public static OpcArrayDimensions GetArrayDimensions(Type type)
vbnet
Public Shared Function GetArrayDimensions(type As Type) As OpcArrayDimensions

Parameters

NameTypeDescription
typeTypeThe type whose array dimensions are to be determined.

Returns

OpcArrayDimensions

The array dimensions with the length 0 for each dimension if the type is an array type; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe type is a null reference (Nothing in Visual Basic).

GetArrayDimensions(Type, object) ​

static · since v2.18

Determines the array dimensions of the value specified, or of the type specified if there is no value.

csharp
public static OpcArrayDimensions GetArrayDimensions(Type type, object value)
vbnet
Public Shared Function GetArrayDimensions(
    type As Type,
    value As Object) As OpcArrayDimensions

Parameters

NameTypeDescription
typeTypeThe type whose array dimensions are used if the value is a null reference (Nothing in Visual Basic).
valueObjectThe value whose array dimensions are to be determined.

Returns

OpcArrayDimensions

The array dimensions of the value (see GetArrayDimensions), or of the type (see GetArrayDimensions) if the value is a null reference.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe type is a null reference (Nothing in Visual Basic).

GetDataType ​

static · 3 overloads

OverloadDescription
GetDataType<T>()staticDetermines the built-in data type of the type specified by T.
GetDataType(Type)staticDetermines the built-in data type of the type specified.
GetDataType(OpcNodeId)staticDetermines the data type represented by the identifier of a data type specified.

GetDataType<T>() ​

static

Determines the built-in data type of the type specified by T.

csharp
public static OpcDataType GetDataType<T>()
vbnet
Public Shared Function GetDataType(Of T)() As OpcDataType

Type parameters

NameDescription
TThe type whose built-in data type is to be determined.

Returns

OpcDataType

The built-in data type (see GetDataType).

GetDataType(Type) ​

static

Determines the built-in data type of the type specified.

csharp
public static OpcDataType GetDataType(Type type)
vbnet
Public Shared Function GetDataType(type As Type) As OpcDataType

Parameters

NameTypeDescription
typeTypeThe type whose built-in data type is to be determined.

Returns

OpcDataType

The built-in data type of the data type of the type (see GetNodeId), or Null if the type is a null reference (Nothing in Visual Basic) or its data type is not defined by OPC UA.

Remarks

For an array type the data type of its elements is determined. Unlike GetDataType, the method results in the built-in type which encodes the data type, e.g. ExtensionObject for a structure and Variant for object.

GetDataType(OpcNodeId) ​

static

Determines the data type represented by the identifier of a data type specified.

csharp
public static OpcDataType GetDataType(OpcNodeId nodeId)
vbnet
Public Shared Function GetDataType(nodeId As OpcNodeId) As OpcDataType

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe identifier of the data type.

Returns

OpcDataType

The member of OpcDataType whose identifier (see GetNodeId) is the nodeId, Object for any other data type, or Null if the nodeId is a null reference (Nothing in Visual Basic) or a null identifier.

GetDefaultValue ​

static · 2 overloads

OverloadDescription
GetDefaultValue<T>()staticDetermines the default value OPC UA defines for the data type of the type specified by T.
GetDefaultValue<T>(T)staticDetermines the default value OPC UA defines for the data type of the type specified by T and the value rank of the value specified.

GetDefaultValue<T>() ​

static

Determines the default value OPC UA defines for the data type of the type specified by T.

csharp
public static T GetDefaultValue<T>()
vbnet
Public Shared Function GetDefaultValue(Of T)() As T

Type parameters

NameDescription
TThe type whose default value is to be determined.

Returns

T

The default value of the data type (e.g. 0 for numbers) if it is a T; otherwise the default value of T.

GetDefaultValue<T>(T) ​

static

Determines the default value OPC UA defines for the data type of the type specified by T and the value rank of the value specified.

csharp
public static T GetDefaultValue<T>(T value)
vbnet
Public Shared Function GetDefaultValue(Of T)(value As T) As T

Type parameters

NameDescription
TThe type whose default value is to be determined.

Parameters

NameTypeDescription
valueTThe value whose value rank is used (see GetValueRank).

Returns

T

The default value of the data type (e.g. 0 for numbers) if it is a T; otherwise the default value of T.

GetNodeId ​

static · 4 overloads

OverloadDescription
GetNodeId<T>()staticDetermines the identifier of the data type of the type specified by T.
GetNodeId(Type)staticDetermines the identifier of the data type of the type specified.
GetNodeId(object)staticDetermines the identifier of the data type of the value specified.
GetNodeId(OpcDataType)staticDetermines the identifier of the data type represented by the type specified.

GetNodeId<T>() ​

static

Determines the identifier of the data type of the type specified by T.

csharp
public static OpcNodeId GetNodeId<T>()
vbnet
Public Shared Function GetNodeId(Of T)() As OpcNodeId

Type parameters

NameDescription
TThe type whose data type is to be determined.

Returns

OpcNodeId

The identifier of the data type (see GetNodeId).

GetNodeId(Type) ​

static

Determines the identifier of the data type of the type specified.

csharp
public static OpcNodeId GetNodeId(Type type)
vbnet
Public Shared Function GetNodeId(type As Type) As OpcNodeId

Parameters

NameTypeDescription
typeTypeThe type whose data type is to be determined.

Returns

OpcNodeId

The identifier of the data type, or Null if the type is a null reference (Nothing in Visual Basic).

Remarks

For an array type the data type of its elements is determined. The type object results in the BaseDataType data type.

GetNodeId(object) ​

static

Determines the identifier of the data type of the value specified.

csharp
public static OpcNodeId GetNodeId(object value)
vbnet
Public Shared Function GetNodeId(value As Object) As OpcNodeId

Parameters

NameTypeDescription
valueObjectThe value whose data type is to be determined.

Returns

OpcNodeId

The identifier of the data type of the type of the value (see GetNodeId), or Null if the value is a null reference (Nothing in Visual Basic).

GetNodeId(OpcDataType) ​

static

Determines the identifier of the data type represented by the type specified.

csharp
public static OpcNodeId GetNodeId(OpcDataType type)
vbnet
Public Shared Function GetNodeId(type As OpcDataType) As OpcNodeId

Parameters

NameTypeDescription
typeOpcDataTypeThe data type whose identifier is to be determined.

Returns

OpcNodeId

The identifier of the data type, or Null for Null, ExtensionObject, Variant and Object.

GetUnderlyingType ​

static · 2 overloads · since v2.10

OverloadDescription
GetUnderlyingType(OpcDataType)static · since v2.10Determines the .NET type used for values of the data type specified.
GetUnderlyingType(OpcNodeId)static · since v2.10Determines the .NET type used for values of the data type with the identifier specified.

GetUnderlyingType(OpcDataType) ​

static · since v2.10

Determines the .NET type used for values of the data type specified.

csharp
public static Type GetUnderlyingType(OpcDataType type)
vbnet
Public Shared Function GetUnderlyingType(type As OpcDataType) As Type

Parameters

NameTypeDescription
typeOpcDataTypeThe data type whose .NET type is to be determined.

Returns

Type

The .NET type (see GetUnderlyingType), or a null reference (Nothing in Visual Basic) for a data type without identifier (see GetNodeId).

GetUnderlyingType(OpcNodeId) ​

static · since v2.10

Determines the .NET type used for values of the data type with the identifier specified.

csharp
public static Type GetUnderlyingType(OpcNodeId nodeId)
vbnet
Public Shared Function GetUnderlyingType(nodeId As OpcNodeId) As Type

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe identifier of the data type.

Returns

Type

The .NET type used for values of the data type (e.g. OpcText for LocalizedText), the .NET type of a data type defined by a .NET type, otherwise object; or a null reference (Nothing in Visual Basic) if the nodeId is a null reference or a null identifier.

GetValueRank ​

static · 4 overloads

OverloadDescription
GetValueRank<T>()staticDetermines the value rank of the type specified by T.
GetValueRank<T>(T)staticDetermines the value rank of the value specified.
GetValueRank(Type)staticDetermines the value rank of the type specified.
GetValueRank(Type, object)staticDetermines the value rank of the value specified, or of the type specified if there is no value.

GetValueRank<T>() ​

static

Determines the value rank of the type specified by T.

csharp
public static int GetValueRank<T>()
vbnet
Public Shared Function GetValueRank(Of T)() As Integer

Type parameters

NameDescription
TThe type whose value rank is to be determined.

Returns

Int32

The value rank (see GetValueRank).

GetValueRank<T>(T) ​

static

Determines the value rank of the value specified.

csharp
public static int GetValueRank<T>(T value)
vbnet
Public Shared Function GetValueRank(Of T)(value As T) As Integer

Type parameters

NameDescription
TThe type of the value.

Parameters

NameTypeDescription
valueTThe value whose value rank is to be determined.

Returns

Int32

The value rank (see GetValueRank).

GetValueRank(Type) ​

static

Determines the value rank of the type specified.

csharp
public static int GetValueRank(Type type)
vbnet
Public Shared Function GetValueRank(type As Type) As Integer

Parameters

NameTypeDescription
typeTypeThe type whose value rank is to be determined.

Returns

Int32

The value rank (see GetValueRank).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe type is a null reference (Nothing in Visual Basic).

GetValueRank(Type, object) ​

static

Determines the value rank of the value specified, or of the type specified if there is no value.

csharp
public static int GetValueRank(Type type, object value)
vbnet
Public Shared Function GetValueRank(type As Type, value As Object) As Integer

Parameters

NameTypeDescription
typeTypeThe type whose value rank is used if the value is a null reference (Nothing in Visual Basic).
valueObjectThe value whose value rank is to be determined.

Returns

Int32

The value rank as defined by OPC UA: -1 for a scalar, otherwise the number of dimensions of the array.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe type is a null reference (Nothing in Visual Basic).

Remarks

A byte array is a one-dimensional array; a ByteString is a scalar.