Reference
OpcStruct Members
Defines a structured data type at runtime, e.g. to provide it by a server using Create.
Reference
OpcStruct Members
Properties
BaseId
Gets the identifier of the base data type of the structure.
public OpcNodeId BaseId { get; }Public ReadOnly Property BaseId As OpcNodeIdProperty value
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.
public OpcEncodingMask EncodingMask { get; }Public ReadOnly Property EncodingMask As OpcEncodingMaskProperty value
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.
public OpcEncoding[] Encodings { get; }Public ReadOnly Property Encodings As OpcEncoding()Property value
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.
public OpcNodeId Id { get; }Public ReadOnly Property Id As OpcNodeIdProperty value
The identifier of the structure, or Null if none has been specified.
Implements
Name
Gets the name of the structure.
public OpcName Name { get; }Public ReadOnly Property Name As OpcNameProperty value
The name of the structure.
Implements
Methods
CreateTypeInfo
Creates the type information of the structure using the context and the typeId specified.
public IOpcDataTypeInfo CreateTypeInfo(OpcContext context, OpcNodeId typeId)Public Function CreateTypeInfo(
context As OpcContext,
typeId As OpcNodeId) As IOpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The context used to resolve the data types of the base type and of the fields. |
typeId | OpcNodeId | The identifier of the data type to create. |
Returns
The type information of the structure.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context or the typeId is a null reference ( |
| Invalid | The data type of an array field is not known by the context. |
Implements
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
| Overload | Description |
|---|---|
| DefineSubType( | Defines a structure derived from the base data type specified. |
| DefineSubType( | Defines a structure derived from the base data type specified. |
| DefineSubType( | Defines a structure with the identifier specified derived from the base data type specified. |
| DefineSubType( | Defines a structure with the identifier specified derived from the base data type specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The baseId, the name or the fields or one of its elements is a null reference ( |
DefineSubType(OpcNodeId, OpcName, params OpcStructField[])
Defines a structure derived from the base data type specified.
public static OpcStruct DefineSubType(
OpcNodeId baseId,
OpcName name,
params OpcStructField[] fields)Public Shared Function DefineSubType(
baseId As OpcNodeId,
name As OpcName,
ParamArray fields As OpcStructField()) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
baseId | OpcNodeId | The identifier of the base data type of the structure. |
name | OpcName | The name of the structure. |
fields | params OpcStructField[] | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineSubType(OpcNodeId, OpcName, IEnumerable<OpcStructField>)
Defines a structure derived from the base data type specified.
public static OpcStruct DefineSubType(
OpcNodeId baseId,
OpcName name,
IEnumerable<OpcStructField> fields)Public Shared Function DefineSubType(
baseId As OpcNodeId,
name As OpcName,
fields As IEnumerable(Of OpcStructField)) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
baseId | OpcNodeId | The identifier of the base data type of the structure. |
name | OpcName | The name of the structure. |
fields | IEnumerable<OpcStructField> | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineSubType(OpcNodeId, OpcNodeId, OpcName, params OpcStructField[])
Defines a structure with the identifier specified derived from the base data type specified.
public static OpcStruct DefineSubType(
OpcNodeId baseId,
OpcNodeId id,
OpcName name,
params OpcStructField[] fields)Public Shared Function DefineSubType(
baseId As OpcNodeId,
id As OpcNodeId,
name As OpcName,
ParamArray fields As OpcStructField()) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
baseId | OpcNodeId | The identifier of the base data type of the structure. |
id | OpcNodeId | The identifier of the structure. |
name | OpcName | The name of the structure. |
fields | params OpcStructField[] | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineSubType(OpcNodeId, OpcNodeId, OpcName, IEnumerable<OpcStructField>)
Defines a structure with the identifier specified derived from the base data type specified.
public static OpcStruct DefineSubType(
OpcNodeId baseId,
OpcNodeId id,
OpcName name,
IEnumerable<OpcStructField> fields)Public Shared Function DefineSubType(
baseId As OpcNodeId,
id As OpcNodeId,
name As OpcName,
fields As IEnumerable(Of OpcStructField)) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
baseId | OpcNodeId | The identifier of the base data type of the structure. |
id | OpcNodeId | The identifier of the structure. |
name | OpcName | The name of the structure. |
fields | IEnumerable<OpcStructField> | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineType
| Overload | Description |
|---|---|
| DefineType( | Defines a structure derived from the Structure data type. |
| DefineType( | Defines a structure derived from the Structure data type. |
| DefineType( | Defines a structure with the identifier specified derived from the Structure data type. |
| DefineType( | Defines a structure with the identifier specified derived from the Structure data type. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The name or the fields or one of its elements is a null reference ( |
DefineType(OpcName, params OpcStructField[])
Defines a structure derived from the Structure data type.
public static OpcStruct DefineType(OpcName name, params OpcStructField[] fields)Public Shared Function DefineType(
name As OpcName,
ParamArray fields As OpcStructField()) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The name of the structure. |
fields | params OpcStructField[] | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineType(OpcName, IEnumerable<OpcStructField>)
Defines a structure derived from the Structure data type.
public static OpcStruct DefineType(
OpcName name,
IEnumerable<OpcStructField> fields)Public Shared Function DefineType(
name As OpcName,
fields As IEnumerable(Of OpcStructField)) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The name of the structure. |
fields | IEnumerable<OpcStructField> | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineType(OpcNodeId, OpcName, params OpcStructField[])
Defines a structure with the identifier specified derived from the Structure data type.
public static OpcStruct DefineType(
OpcNodeId id,
OpcName name,
params OpcStructField[] fields)Public Shared Function DefineType(
id As OpcNodeId,
name As OpcName,
ParamArray fields As OpcStructField()) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the structure. |
name | OpcName | The name of the structure. |
fields | params OpcStructField[] | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
DefineType(OpcNodeId, OpcName, IEnumerable<OpcStructField>)
Defines a structure with the identifier specified derived from the Structure data type.
public static OpcStruct DefineType(
OpcNodeId id,
OpcName name,
IEnumerable<OpcStructField> fields)Public Shared Function DefineType(
id As OpcNodeId,
name As OpcName,
fields As IEnumerable(Of OpcStructField)) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the structure. |
name | OpcName | The name of the structure. |
fields | IEnumerable<OpcStructField> | The fields of the structure in the order of their encoding. |
Returns
A new OpcStruct which defines the structure.
GetFields
Returns the fields of the structure.
public OpcStructField[] GetFields()Public Function GetFields() As OpcStructField()Returns
A new array of the fields in the order of their definition.
GetNames
Returns the names of the fields of the structure.
public string[] GetNames()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.
public OpcStruct WithEncodingMask(OpcEncodingMask encodingMask)Public Function WithEncodingMask(encodingMask As OpcEncodingMask) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
encodingMask | OpcEncodingMask | The encoding mask to use. |
Returns
This structure.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The encodingMask is a null reference ( |
WithEncodings
Sets the encodings of the structure.
public OpcStruct WithEncodings(params OpcEncoding[] encodings)Public Function WithEncodings(
ParamArray encodings As OpcEncoding()) As OpcStructParameters
| Name | Type | Description |
|---|---|---|
encodings | params OpcEncoding[] | The encodings to use. |
Returns
This structure.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The encodings or one of its elements is a null reference ( |

