Skip to content

Reference

OpcStruct Members

Defines a structured data type at runtime, e.g. to provide it by a server using Create.

Reference

OpcStruct Members ​

Type
OpcStruct
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Properties ​

BaseId ​

Gets the identifier of the base data type of the structure.

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

Property value

OpcNodeId

The identifier of the base data type; the identifier of the Structure data type for a structure defined using DefineType.

EncodingMask ​

Gets the encoding mask of the structure.

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

Property value

OpcEncodingMask

The encoding mask set using WithEncodingMask, or a null reference (Nothing in Visual Basic) if none has been set; then DefaultAuto is used.

Encodings ​

Gets the encodings of the structure.

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

Property value

OpcEncoding[]

The encodings set using WithEncodings, or a null reference (Nothing in Visual Basic) if none have been set; then all encodings of the identifier of the data type are used.

Id ​

Gets the identifier of the structure.

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

Property value

OpcNodeId

The identifier of the structure, or Null if none has been specified.

Implements

Id

Name ​

Gets the name of the structure.

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

Property value

OpcName

The name of the structure.

Implements

Name

Methods ​

CreateTypeInfo ​

Creates the type information of the structure using the context and the typeId specified.

csharp
public IOpcDataTypeInfo CreateTypeInfo(OpcContext context, OpcNodeId typeId)
vbnet
Public Function CreateTypeInfo(
    context As OpcContext,
    typeId As OpcNodeId) As IOpcDataTypeInfo

Parameters

NameTypeDescription
contextOpcContextThe context used to resolve the data types of the base type and of the fields.
typeIdOpcNodeIdThe identifier of the data type to create.

Returns

IOpcDataTypeInfo

The type information of the structure.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or the typeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe data type of an array field is not known by the context.

Implements

CreateTypeInfo

Remarks

The data types of the fields are resolved using the context while the type information is created. A field whose data type is the typeId refers to the structure itself. The name of the structure is placed in the namespace of the typeId.

DefineSubType ​

static · 4 overloads

OverloadDescription
DefineSubType(OpcNodeId, OpcName, params OpcStructField[])staticDefines a structure derived from the base data type specified.
DefineSubType(OpcNodeId, OpcName, IEnumerable<OpcStructField>)staticDefines a structure derived from the base data type specified.
DefineSubType(OpcNodeId, OpcNodeId, OpcName, params OpcStructField[])staticDefines a structure with the identifier specified derived from the base data type specified.
DefineSubType(OpcNodeId, OpcNodeId, OpcName, IEnumerable<OpcStructField>)staticDefines a structure with the identifier specified derived from the base data type specified.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionThe baseId, the name or the fields or one of its elements is a null reference (Nothing in Visual Basic).

DefineSubType(OpcNodeId, OpcName, params OpcStructField[]) ​

static

Defines a structure derived from the base data type specified.

csharp
public static OpcStruct DefineSubType(
    OpcNodeId baseId,
    OpcName name,
    params OpcStructField[] fields)
vbnet
Public Shared Function DefineSubType(
    baseId As OpcNodeId,
    name As OpcName,
    ParamArray fields As OpcStructField()) As OpcStruct

Parameters

NameTypeDescription
baseIdOpcNodeIdThe identifier of the base data type of the structure.
nameOpcNameThe name of the structure.
fieldsparams OpcStructField[]The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineSubType(OpcNodeId, OpcName, IEnumerable<OpcStructField>) ​

static

Defines a structure derived from the base data type specified.

csharp
public static OpcStruct DefineSubType(
    OpcNodeId baseId,
    OpcName name,
    IEnumerable<OpcStructField> fields)
vbnet
Public Shared Function DefineSubType(
    baseId As OpcNodeId,
    name As OpcName,
    fields As IEnumerable(Of OpcStructField)) As OpcStruct

Parameters

NameTypeDescription
baseIdOpcNodeIdThe identifier of the base data type of the structure.
nameOpcNameThe name of the structure.
fieldsIEnumerable<OpcStructField>The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineSubType(OpcNodeId, OpcNodeId, OpcName, params OpcStructField[]) ​

static

Defines a structure with the identifier specified derived from the base data type specified.

csharp
public static OpcStruct DefineSubType(
    OpcNodeId baseId,
    OpcNodeId id,
    OpcName name,
    params OpcStructField[] fields)
vbnet
Public Shared Function DefineSubType(
    baseId As OpcNodeId,
    id As OpcNodeId,
    name As OpcName,
    ParamArray fields As OpcStructField()) As OpcStruct

Parameters

NameTypeDescription
baseIdOpcNodeIdThe identifier of the base data type of the structure.
idOpcNodeIdThe identifier of the structure.
nameOpcNameThe name of the structure.
fieldsparams OpcStructField[]The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineSubType(OpcNodeId, OpcNodeId, OpcName, IEnumerable<OpcStructField>) ​

static

Defines a structure with the identifier specified derived from the base data type specified.

csharp
public static OpcStruct DefineSubType(
    OpcNodeId baseId,
    OpcNodeId id,
    OpcName name,
    IEnumerable<OpcStructField> fields)
vbnet
Public Shared Function DefineSubType(
    baseId As OpcNodeId,
    id As OpcNodeId,
    name As OpcName,
    fields As IEnumerable(Of OpcStructField)) As OpcStruct

Parameters

NameTypeDescription
baseIdOpcNodeIdThe identifier of the base data type of the structure.
idOpcNodeIdThe identifier of the structure.
nameOpcNameThe name of the structure.
fieldsIEnumerable<OpcStructField>The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineType ​

static · 4 overloads

OverloadDescription
DefineType(OpcName, params OpcStructField[])staticDefines a structure derived from the Structure data type.
DefineType(OpcName, IEnumerable<OpcStructField>)staticDefines a structure derived from the Structure data type.
DefineType(OpcNodeId, OpcName, params OpcStructField[])staticDefines a structure with the identifier specified derived from the Structure data type.
DefineType(OpcNodeId, OpcName, IEnumerable<OpcStructField>)staticDefines a structure with the identifier specified derived from the Structure data type.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionThe name or the fields or one of its elements is a null reference (Nothing in Visual Basic).

DefineType(OpcName, params OpcStructField[]) ​

static

Defines a structure derived from the Structure data type.

csharp
public static OpcStruct DefineType(OpcName name, params OpcStructField[] fields)
vbnet
Public Shared Function DefineType(
    name As OpcName,
    ParamArray fields As OpcStructField()) As OpcStruct

Parameters

NameTypeDescription
nameOpcNameThe name of the structure.
fieldsparams OpcStructField[]The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineType(OpcName, IEnumerable<OpcStructField>) ​

static

Defines a structure derived from the Structure data type.

csharp
public static OpcStruct DefineType(
    OpcName name,
    IEnumerable<OpcStructField> fields)
vbnet
Public Shared Function DefineType(
    name As OpcName,
    fields As IEnumerable(Of OpcStructField)) As OpcStruct

Parameters

NameTypeDescription
nameOpcNameThe name of the structure.
fieldsIEnumerable<OpcStructField>The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineType(OpcNodeId, OpcName, params OpcStructField[]) ​

static

Defines a structure with the identifier specified derived from the Structure data type.

csharp
public static OpcStruct DefineType(
    OpcNodeId id,
    OpcName name,
    params OpcStructField[] fields)
vbnet
Public Shared Function DefineType(
    id As OpcNodeId,
    name As OpcName,
    ParamArray fields As OpcStructField()) As OpcStruct

Parameters

NameTypeDescription
idOpcNodeIdThe identifier of the structure.
nameOpcNameThe name of the structure.
fieldsparams OpcStructField[]The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

DefineType(OpcNodeId, OpcName, IEnumerable<OpcStructField>) ​

static

Defines a structure with the identifier specified derived from the Structure data type.

csharp
public static OpcStruct DefineType(
    OpcNodeId id,
    OpcName name,
    IEnumerable<OpcStructField> fields)
vbnet
Public Shared Function DefineType(
    id As OpcNodeId,
    name As OpcName,
    fields As IEnumerable(Of OpcStructField)) As OpcStruct

Parameters

NameTypeDescription
idOpcNodeIdThe identifier of the structure.
nameOpcNameThe name of the structure.
fieldsIEnumerable<OpcStructField>The fields of the structure in the order of their encoding.

Returns

OpcStruct

A new OpcStruct which defines the structure.

GetFields ​

Returns the fields of the structure.

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

Returns

OpcStructField[]

A new array of the fields in the order of their definition.

GetNames ​

Returns the names of the fields of the structure.

csharp
public string[] GetNames()
vbnet
Public Function GetNames() As String()

Returns

String[]

The names of the fields in the order of their definition.

WithEncodingMask ​

Sets the encoding mask of the structure.

csharp
public OpcStruct WithEncodingMask(OpcEncodingMask encodingMask)
vbnet
Public Function WithEncodingMask(encodingMask As OpcEncodingMask) As OpcStruct

Parameters

NameTypeDescription
encodingMaskOpcEncodingMaskThe encoding mask to use.

Returns

OpcStruct

This structure.

Exceptions

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

WithEncodings ​

Sets the encodings of the structure.

csharp
public OpcStruct WithEncodings(params OpcEncoding[] encodings)
vbnet
Public Function WithEncodings(
    ParamArray encodings As OpcEncoding()) As OpcStruct

Parameters

NameTypeDescription
encodingsparams OpcEncoding[]The encodings to use.

Returns

OpcStruct

This structure.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe encodings or one of its elements is a null reference (Nothing in Visual Basic).