Reference
OpcStructField Members
Represents a field of a structure defined using OpcStruct.
Reference
OpcStructField Members
- Type
- OpcStructField
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Constructors
OpcStructField
| Overload | Description |
|---|---|
| OpcStructField( | Initializes a new instance of the OpcStructField class using the unique name and fieldTypeId of the structure field to define. |
| OpcStructField( | Initializes a new instance of the OpcStructField class using the unique name, fieldTypeId and description of the structure field to define. |
OpcStructField(string, OpcNodeId)
Initializes a new instance of the OpcStructField class using the unique name and fieldTypeId of the structure field to define.
public OpcStructField(string name, OpcNodeId fieldTypeId)Public Sub New(name As String, fieldTypeId As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
name | String | The name of the structure field which unique identifies the field in the structure. |
fieldTypeId | OpcNodeId | The identifier of the data type the field uses for its value. |
OpcStructField(string, OpcNodeId, string)
Initializes a new instance of the OpcStructField class using the unique name, fieldTypeId and description of the structure field to define.
public OpcStructField(string name, OpcNodeId fieldTypeId, string description)Public Sub New(name As String, fieldTypeId As OpcNodeId, description As String)Parameters
| Name | Type | Description |
|---|---|---|
name | String | The name of the structure field which unique identifies the field in the structure. |
fieldTypeId | OpcNodeId | The identifier of the data type the field uses for its value. |
description | String | The description of the purpose of the structure field. |
Properties
ArrayRank
Gets the number of dimensions of the field if it is an array.
public int ArrayRank { get; }Public ReadOnly Property ArrayRank As IntegerProperty value
The number of dimensions set using AsArray or AsArray, or -1 if the field is not an array.
Description
Gets description of the structure field which defines the purpose of the field.
public string Description { get; }Public ReadOnly Property Description As StringProperty value
The description of the purpose of the structure field represented.
FieldTypeId
Gets the identifier of the data type of the value of the field.
public OpcNodeId FieldTypeId { get; }Public ReadOnly Property FieldTypeId As OpcNodeIdProperty value
The identifier of the data type of the value.
IsArray
Gets a value indicating whether the field is an array.
public bool IsArray { get; }Public ReadOnly Property IsArray As BooleanProperty value
The value true if the field has been declared as an array using one of the AsArray methods; otherwise the value false.
IsOptional
Gets a value indicating whether the field is optional.
public bool IsOptional { get; }Public ReadOnly Property IsOptional As BooleanProperty value
The value true if the field has been declared as optional using one of the AsOptional methods; otherwise the value false.
Length
Gets the length of the field if it is an array.
public OpcMemberLength Length { get; }Public ReadOnly Property Length As OpcMemberLengthProperty value
The length set using one of the AsArray methods, or a null reference (Nothing in Visual Basic) if the field is not an array.
Name
Gets the name of the structure field which unique identifies the field in the structure.
public string Name { get; }Public ReadOnly Property Name As StringProperty value
The unique name of the structure field.
Switch
Gets the switch which controls the existence of the field if it is optional.
public OpcMemberSwitch Switch { get; }Public ReadOnly Property Switch As OpcMemberSwitchProperty value
The switch set using AsOptional, or a null reference (Nothing in Visual Basic) if none has been set.
Methods
AsArray
| Overload | Description |
|---|---|
| AsArray() | Declares the field as a one-dimensional array with a variable length. |
| AsArray( | Declares the field as a one-dimensional array with the length specified. |
| AsArray( | Declares the field as a one-dimensional array whose length is the value of the field specified. |
| AsArray( | Declares the field as an array with the rank and the length specified. |
| AsArray( | Declares the field as an array with the rank specified whose length is the value of the field specified. |
AsArray()
Declares the field as a one-dimensional array with a variable length.
public OpcStructField AsArray()Public Function AsArray() As OpcStructFieldReturns
This field.
Remarks
A new value of the field starts as an empty array.
AsArray(long)
Declares the field as a one-dimensional array with the length specified.
public OpcStructField AsArray(long length)Public Function AsArray(length As Long) As OpcStructFieldParameters
| Name | Type | Description |
|---|---|---|
length | Int64 | The number of elements of the array, or 0 for an array with a variable length. |
Returns
This field.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The length is less than zero. |
Remarks
A new value of a field with the length 0 starts as an empty array.
AsArray(string)
Declares the field as a one-dimensional array whose length is the value of the field specified.
public OpcStructField AsArray(string lengthField)Public Function AsArray(lengthField As String) As OpcStructFieldParameters
| Name | Type | Description |
|---|---|---|
lengthField | String | The name of the field whose value is the length of the array; it is to precede this field. |
Returns
This field.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The lengthField is equals Empty. |
| Argument | The lengthField is a null reference ( |
AsArray(int, long)
Declares the field as an array with the rank and the length specified.
public OpcStructField AsArray(int rank, long length)Public Function AsArray(rank As Integer, length As Long) As OpcStructFieldParameters
| Name | Type | Description |
|---|---|---|
rank | Int32 | The number of dimensions of the array, from 1 to 32. |
length | Int64 | The number of elements of the array, or 0 for an array with a variable length. |
Returns
This field.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The rank is less than 1 or greater than 32, or the length is less than zero. |
Remarks
A new value of a field with the length 0 starts as an empty array.
AsArray(int, string)
Declares the field as an array with the rank specified whose length is the value of the field specified.
public OpcStructField AsArray(int rank, string lengthField)Public Function AsArray(
rank As Integer,
lengthField As String) As OpcStructFieldParameters
| Name | Type | Description |
|---|---|---|
rank | Int32 | The number of dimensions of the array, from 1 to 32. |
lengthField | String | The name of the field whose value is the length of the array; it is to precede this field. |
Returns
This field.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The lengthField is equals Empty. |
| Argument | The lengthField is a null reference ( |
| Argument | The rank is less than 1 or greater than 32. |
AsOptional
| Overload | Description |
|---|---|
| AsOptional() | Declares the field as optional. |
| AsOptional( | Declares the field as optional whose existence is controlled by the switch specified. |
AsOptional()
Declares the field as optional.
public OpcStructField AsOptional()Public Function AsOptional() As OpcStructFieldReturns
This field.
AsOptional(OpcMemberSwitch)
Declares the field as optional whose existence is controlled by the switch specified.
public OpcStructField AsOptional(OpcMemberSwitch memberSwitch)Public Function AsOptional(memberSwitch As OpcMemberSwitch) As OpcStructFieldParameters
| Name | Type | Description |
|---|---|---|
memberSwitch | OpcMemberSwitch | The switch which controls the existence of the field. |
Returns
This field.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The memberSwitch is a null reference ( |

