Skip to content

Reference

OpcDataTypeInfo Members

Represents type declarations used for data types.

Reference

OpcDataTypeInfo Members ​

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

Properties ​

BaseType ​

virtual

Gets the type from which the current OpcDataTypeInfo directly inherits.

csharp
public virtual OpcDataTypeInfo BaseType { get; }
vbnet
Public Overridable ReadOnly Property BaseType As OpcDataTypeInfo

Property value

OpcDataTypeInfo

An instance of the OpcDataTypeInfo which represents the type from which the current OpcDataTypeInfo directly inherits or a null reference (Nothing in Visual Basic) if the type does not inherit from a different OpcDataTypeInfo.

ByteOrder ​

virtual

Gets the byte order of the data represented by the type.

csharp
public virtual OpcByteOrder? ByteOrder { get; }
vbnet
Public Overridable ReadOnly Property ByteOrder As OpcByteOrder?

Property value

Nullable<OpcByteOrder>

One of the members defined by the OpcByteOrder enumeration which overrides the ByteOrder of its TypeDictionary or a null reference (Nothing in Visual Basic) if the OpcByteOrder is to be used from the TypeDictionary of this type.

Category ​

Gets the category the IOpcType falls within.

csharp
public OpcTypeCategory Category { get; }
vbnet
Public ReadOnly Property Category As OpcTypeCategory

Property value

OpcTypeCategory

One of the members defined by the OpcTypeCategory enumeration.

Implements

Category

Remarks

This implementation always returns DataType.

CustomAttributes ​

virtual

Gets an array of custom attributes associated with this type.

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 type.

Remarks

Applications are not be required to understand these attributes in order to interpret an encoded instance of the type.

Declarations ​

virtual · since v2.26

Gets a value indicating the ways used to declare the data type represented.

csharp
public virtual OpcDataTypeDeclarations Declarations { get; }
vbnet
Public Overridable ReadOnly Property Declarations As OpcDataTypeDeclarations

Property value

OpcDataTypeDeclarations

One or a combination of the members defined by the OpcDataTypeDeclarations enumeration.

Documentation ​

virtual · since v2.9

Gets any semantic information that would help a human to understand what the type represents.

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

Property value

String

A human readable text that describes the type and that would help a human to understand what the type represents.

Empty ​

static

Gets the type to use if their is no specific type data available.

csharp
public static OpcDataTypeInfo Empty { get; }
vbnet
Public Shared ReadOnly Property Empty As OpcDataTypeInfo

Property value

OpcDataTypeInfo

An instance of the OpcDataTypeInfo class which refers to the Empty.

Encoding ​

Gets the information used to identify the type of encoding used for the data of the type represented.

csharp
public OpcEncoding Encoding { get; }
vbnet
Public ReadOnly Property Encoding As OpcEncoding

Property value

OpcEncoding

An instance of the OpcEncoding class which represents the information used to encode data of the type or a null reference (Nothing in Visual Basic) if is no encoding information associated with the type.

Implements

Encoding

EncodingMask ​

virtual

Gets the characteristics used to encode the existence of optional fields.

csharp
public virtual OpcEncodingMask EncodingMask { get; }
vbnet
Public Overridable ReadOnly Property EncodingMask As OpcEncodingMask

Property value

OpcEncodingMask

An instance of the OpcEncodingMask class.

Implements

EncodingMask

Encodings ​

virtual

Gets information of all encodings supported by the type represented.

csharp
public virtual OpcEncoding[] Encodings { get; }
vbnet
Public Overridable ReadOnly Property Encodings As OpcEncoding()

Property value

OpcEncoding[]

An array of OpcEncoding instances supported by the type.

Implements

Encodings

IsArray ​

virtual

Gets a value indicating whether the type is an array.

csharp
public virtual bool IsArray { get; }
vbnet
Public Overridable ReadOnly Property IsArray As Boolean

Property value

Boolean

The value true if the current type is an array; otherwise the value false.

Implements

IsArray

IsEmpty ​

virtual

Gets a value indicating whether the current OpcDataTypeInfo represents a type to use if there is no specific type described.

csharp
public virtual bool IsEmpty { get; }
vbnet
Public Overridable ReadOnly Property IsEmpty As Boolean

Property value

Boolean

The value true if the type does not declare a specific type; otherwise the value false.

IsEnum ​

virtual

Gets a value indicating whether the current OpcDataTypeInfo represents an enumeration.

csharp
public virtual bool IsEnum { get; }
vbnet
Public Overridable ReadOnly Property IsEnum As Boolean

Property value

Boolean

The value true if the current OpcDataTypeInfo represents an enumeration; otherwise the value false.

Implements

IsEnum

Remarks

The OPC UA handles enumerations as a numeric value that has a fixed set of valid values. The encoded value described by an enumeration is always an unsigned integer (see uint) with a fixed size.

IsOpaque ​

virtual

Gets a value indicating whether the current OpcDataTypeInfo describes a primitive fixed size type.

csharp
public virtual bool IsOpaque { get; }
vbnet
Public Overridable ReadOnly Property IsOpaque As Boolean

Property value

Boolean

The value true if the current OpcDataTypeInfo represents an opaque type; otherwise the value false.

Implements

IsOpaque

IsPrimitive ​

virtual

Gets a value indicating whether the OpcDataTypeInfo is one of the primitive types.

csharp
public virtual bool IsPrimitive { get; }
vbnet
Public Overridable ReadOnly Property IsPrimitive As Boolean

Property value

Boolean

The value true if the OpcDataTypeInfo is one of the primitive types; otherwise the value false.

Implements

IsPrimitive

IsStruct ​

virtual

Gets a value indicating whether the OpcDataTypeInfo is a structured type; that is not a value type.

csharp
public virtual bool IsStruct { get; }
vbnet
Public Overridable ReadOnly Property IsStruct As Boolean

Property value

Boolean

The value true if the OpcDataTypeInfo is a structured type; otherwise the value false.

Implements

IsStruct

Remarks

The OPC UA handles structures as a sequence of values. Each value in the sequence is called a field. A field may specify that zero, one or multiple instances of the type appear within the sequence described by the structure. Some fields have lengths that are not multiples of 8 bits. Several of these fields may appear in a sequence in a structure, however, the total number of bits used in the sequence shall be aligned on a byte boundary. A sequence of fields which do not line up on byte boundaries are specified from the least significant bit to the most significant bit. Sequences which are longer than one byte overflow from the most significant bit to the first byte into the least significant bit of the next byte.

IsSystemType ​

virtual

Gets a value indicating whether the current OpcDataTypeInfo represents one of the predefined built-in data types defined by the OPC UA.

csharp
public virtual bool IsSystemType { get; }
vbnet
Public Overridable ReadOnly Property IsSystemType As Boolean

Property value

Boolean

The value true if the current data type represents a OPC UA is a built-in type; otherwise the value false.

Implements

IsSystemType

IsUnion ​

virtual · since v2.32

Gets a value indicating whether the current OpcDataTypeInfo represents a type which is only transported using a field indicator and the field indicated.

csharp
public virtual bool IsUnion { get; }
vbnet
Public Overridable ReadOnly Property IsUnion As Boolean

Property value

Boolean

The value true if the current data type represents an union type; otherwise the value false.

Implements

IsUnion

IsUnknown ​

virtual

Gets a value indicating whether the OpcDataTypeInfo acts as a placeholder for a referenced type its type declaration could not resolved.

csharp
public virtual bool IsUnknown { get; }
vbnet
Public Overridable ReadOnly Property IsUnknown As Boolean

Property value

Boolean

The value true if the OpcDataTypeInfo acts as a placeholder for an unresolved type declaration; otherwise the value false.

Implements

IsUnknown

Name ​

Gets a value which defines the non-localizable human-readable name of the type represented. A node which represents this OpcDataTypeInfo uses the Name as its BrowseName.

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

Property value

OpcName

An instance of the OpcName class with the string used as the name of the type which does not unambiguously identify the OpcDataTypeInfo.

Implements

Name, Name

Size ​

virtual

Gets the size of the type represented as the number of bytes required.

csharp
public virtual long? Size { get; }
vbnet
Public Overridable ReadOnly Property Size As Long?

Property value

Nullable<Int64>

The size of the type as the number of bytes required; if this OpcDataTypeInfo represents a type with a fixed size (see IsOpaque).

Implements

Size

SizeInBits ​

virtual

Gets the size of the type represented as the number of bits required.

csharp
public virtual long? SizeInBits { get; }
vbnet
Public Overridable ReadOnly Property SizeInBits As Long?

Property value

Nullable<Int64>

The size of the type as the number of bits required; if this OpcDataTypeInfo represents a type with a fixed size (see IsOpaque).

Implements

SizeInBits

TypeDictionary ​

Gets the the OpcDataTypeDictionary which conains the data type declaration represented.

csharp
public OpcDataTypeDictionary TypeDictionary { get; }
vbnet
Public ReadOnly Property TypeDictionary As OpcDataTypeDictionary

Property value

OpcDataTypeDictionary

An instance of the OpcDataTypeDictionary class which defines the current OpcDataTypeInfo.

TypeId ​

Gets a value which identifies the type represented. A node which represents this OpcDataTypeInfo uses the TypeId as its NodeId.

csharp
public OpcNodeId TypeId { get; }
vbnet
Public ReadOnly Property TypeId As OpcNodeId

Property value

OpcNodeId

An instance of the OpcNodeId class used as the identifier of the type which unambiguously identifies the OpcDataTypeInfo.

Implements

TypeId, TypeId

UnderlyingType ​

Gets the type which provides the implementation of the OpcDataTypeInfo.

csharp
public Type UnderlyingType { get; }
vbnet
Public ReadOnly Property UnderlyingType As Type

Property value

Type

The Type which implements the type declared or a null reference (Nothing in Visual Basic) if there does not exist a declaration of the type described by this OpcDataTypeInfo.

Implements

UnderlyingType, UnderlyingType

XmlName ​

Gets the Name of this OpcDataTypeInfo qualified with the XmlNamespace of the TypeDictionary which conains the data type declaration represented.

csharp
public XmlQualifiedName XmlName { get; protected set; }
vbnet
Public Property XmlName As XmlQualifiedName

Property value

XmlQualifiedName

An instance of the XmlQualifiedName class which identifies this OpcDataTypeInfo using a full qualified name which includes the XmlNamespace and Name of this type using the Value of the OpcName used.

Remarks

The XmlQualifiedName is used in OPC UA to refer to existing types when for example declaring fields.

Methods ​

GetArrayRank ​

virtual

Gets the number of dimensions in an array.

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

Returns

Int32

An integer that contains the number of dimensions in the current type.

Exceptions

ExceptionCondition
ArgumentExceptionThe current type is not an array.

Implements

GetArrayRank

GetElementType ​

virtual

Returns the OpcDataTypeInfo of the object encompassed or referred to by the current array.

csharp
public virtual OpcDataTypeInfo GetElementType()
vbnet
Public Overridable Function GetElementType() As OpcDataTypeInfo

Returns

OpcDataTypeInfo

The OpcDataTypeInfo of the object encompassed or referred to by the current array or null if the current OpcDataTypeInfo is not an array.

GetField ​

Searches for the field with the specified name.

csharp
public OpcDataFieldInfo GetField(string name)
vbnet
Public Function GetField(name As String) As OpcDataFieldInfo

Parameters

NameTypeDescription
nameStringThe string containing the name of the data field to get.

Returns

OpcDataFieldInfo

An instance of the OpcDataFieldInfo representing the field with the specified name, if found; otherwise a null reference (Nothing in Visual Basic).

Exceptions

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

Remarks

The name specified is compared using Ordinal.

GetFields ​

Returns all the fields of the current OpcDataTypeInfo.

csharp
public OpcDataFieldInfo[] GetFields()
vbnet
Public Function GetFields() As OpcDataFieldInfo()

Returns

OpcDataFieldInfo[]

An array of OpcDataFieldInfo objects representing all the fields defined for the current OpcDataTypeInfo or an empty array of type OpcDataFieldInfo if no fields are defined for the current OpcDataTypeInfo.

GetFieldsCore ​

protected · virtual

When overriden in a derived class, searches for the fields defined for the current OpcDataTypeInfo.

csharp
protected virtual IEnumerable<OpcDataFieldInfo> GetFieldsCore()
vbnet
Protected Overridable Function GetFieldsCore() As IEnumerable(Of OpcDataFieldInfo)

Returns

IEnumerable<OpcDataFieldInfo>

A sequence of OpcDataFieldInfo objects representing all fields defined for the current OpcDataTypeInfo.

GetUnderlyingType ​

protected · virtual

Retrieves the Type which provides the implementation of the OpcDataTypeInfo.

csharp
protected virtual Type GetUnderlyingType()
vbnet
Protected Overridable Function GetUnderlyingType() As Type

Returns

Type

The Type which implements the type declared or a null reference (Nothing in Visual Basic) if there does not exist a declaration of the type described by this OpcDataTypeInfo.

Remarks

To determine the underlying Type this method queries the Type using the TypeResolve event. If there is no Type information provided the method queries the types defined by the foundation stack using the TypeId and Encoding of this OpcDataTypeInfo. If there is still no Type determined the method tries to resolve the Type using the Name to construct type names of types defined in the 'Opc.Ua' and 'System' namespace.

GetXmlName ​

static · 3 overloads

OverloadDescription
GetXmlName(string, string)staticRetrieves the XmlQualifiedName for the name and xmlNamespace specified.
GetXmlName(string, OpcNamespace)staticRetrieves the XmlQualifiedName for the name and namespace specified.
GetXmlName(string, OpcDataTypeDictionary)staticRetrieves the XmlQualifiedName for the name and typeDictionary specified.

GetXmlName(string, string) ​

static

Retrieves the XmlQualifiedName for the name and xmlNamespace specified.

csharp
public static XmlQualifiedName GetXmlName(string name, string xmlNamespace)
vbnet
Public Shared Function GetXmlName(
    name As String,
    xmlNamespace As String) As XmlQualifiedName

Parameters

NameTypeDescription
nameStringThe name of the entity for which the XmlQualifiedName is to be created. The value is used for the Name.
xmlNamespaceStringThe namespace within the entity has been declared and which is to be referenced by the Namespace to retrieve. This value can be a null reference (Nothing in Visual Basic) or equals to Empty.

Returns

XmlQualifiedName

A new instance of the XmlQualifiedName which uses the name for the Name and the xmlNamespace (if specified) for the Namespace.

GetXmlName(string, OpcNamespace) ​

static

Retrieves the XmlQualifiedName for the name and namespace specified.

csharp
public static XmlQualifiedName GetXmlName(string name, OpcNamespace @namespace)
vbnet
Public Shared Function GetXmlName(
    name As String,
    [namespace] As OpcNamespace) As XmlQualifiedName

Parameters

NameTypeDescription
nameStringThe name of the entity for which the XmlQualifiedName is to be created. The value is used for the Name.
namespaceOpcNamespaceThe OpcNamespace its Uri or Value is used to define the Namespace to retrieve. This can be a null reference (Nothing in Visual Basic) as well.

Returns

XmlQualifiedName

A new instance of the XmlQualifiedName which uses the name for the Name and the namespace (if specified) for the Namespace.

GetXmlName(string, OpcDataTypeDictionary) ​

static

Retrieves the XmlQualifiedName for the name and typeDictionary specified.

csharp
public static XmlQualifiedName GetXmlName(
    string name,
    OpcDataTypeDictionary typeDictionary)
vbnet
Public Shared Function GetXmlName(
    name As String,
    typeDictionary As OpcDataTypeDictionary) As XmlQualifiedName

Parameters

NameTypeDescription
nameStringThe name of the entity for which the XmlQualifiedName is to be created. The value is used for the Name.
typeDictionaryOpcDataTypeDictionaryThe OpcDataTypeDictionary its XmlNamespace is used to define the Namespace to retrieve. This can be a null reference (Nothing in Visual Basic) as well.

Returns

XmlQualifiedName

A new instance of the XmlQualifiedName which uses the name for the Name and the typeDictionary (if specified) for the Namespace.

MakeArrayType ​

2 overloads

OverloadDescription
MakeArrayType()Returns a OpcDataTypeInfo object representing a one-dimensional array of the current type, with a lower bound of zero.
MakeArrayType(int)Returns a OpcDataTypeInfo object representing an array of the current type, with the specified number of dimensions.

MakeArrayType() ​

Returns a OpcDataTypeInfo object representing a one-dimensional array of the current type, with a lower bound of zero.

csharp
public OpcDataTypeInfo MakeArrayType()
vbnet
Public Function MakeArrayType() As OpcDataTypeInfo

Returns

OpcDataTypeInfo

A OpcDataTypeInfo object representing a one-dimensional array of the current type, with a lower bound of zero.

MakeArrayType(int) ​

Returns a OpcDataTypeInfo object representing an array of the current type, with the specified number of dimensions.

csharp
public OpcDataTypeInfo MakeArrayType(int rank)
vbnet
Public Function MakeArrayType(rank As Integer) As OpcDataTypeInfo

Parameters

NameTypeDescription
rankInt32The number of dimensions for the array. This number must be less than or equal to 32.

Returns

OpcDataTypeInfo

An object representing an array of the current type, with the specified number of dimensions.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe rank is not between 1 and 32 (inclusive).

ToString ​

override

Returns a string representing the Name or the UnderlyingType of the current OpcDataTypeInfo.

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

Returns

String

A string representing the Name or the UnderlyingType of the current OpcDataTypeInfo.

Overrides

ToString()