Reference
OpcDataObject Members
Provides a generic and dynamically accessible representation of structured data types.
Reference
OpcDataObject Members
- Type
- OpcDataObject
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from OpcData.
Constructors
OpcDataObject
Initializes a new instance of the OpcDataObject class using the type information of the dataType specified.
public OpcDataObject(OpcDataTypeInfo dataType)Public Sub New(dataType As OpcDataTypeInfo)Parameters
| Name | Type | Description |
|---|---|---|
dataType | OpcDataTypeInfo | The OpcDataTypeInfo of the structured data type to represent. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType is not a structured data type ( |
| Argument | The dataType is a null reference ( |
Methods
GetField
Searches for the field with the specified name.
public OpcDataField GetField(string name)Public Function GetField(name As String) As OpcDataFieldParameters
| Name | Type | Description |
|---|---|---|
name | String | The string containing the name of the data field to get. |
Returns
An instance of the OpcDataField representing the field with the specified name, if found; otherwise a null reference (Nothing in Visual Basic).
Remarks
The name specified is compared using Ordinal.
GetFields
Returns all the fields of the current OpcDataObject.
public OpcDataField[] GetFields()Public Function GetFields() As OpcDataField()Returns
An array of OpcDataField objects representing all the fields defined for the current OpcDataObject or an empty array of type OpcDataField if no fields are defined for the current OpcDataObject.
GetTypeInfo
Gets the OpcDataTypeInfo of the current structured data type instance represented.
public OpcDataTypeInfo GetTypeInfo()Public Function GetTypeInfo() As OpcDataTypeInfoReturns
The OpcDataTypeInfo of the current structured data type instance.
HasField
Determines whether the current OpcDataObject provides a OpcDataField with the Name equals to the name specified.
public bool HasField(string name)Public Function HasField(name As String) As BooleanParameters
| Name | Type | Description |
|---|---|---|
name | String | The string containing the name of the data field to test. |
Returns
The value true if there exists a OpcDataField with the name specified; otherwise the value false.
Remarks
The name specified is compared using Ordinal.
TryGetField
Searches for the field associated with the name specified.
public bool TryGetField(string name, out OpcDataField field)Public Function TryGetField(name As String, field As OpcDataField) As BooleanParameters
| Name | Type | Description |
|---|---|---|
name | String | The string containing the name of the data field to get. |
field | out OpcDataField | The OpcDataField representing the field with the specified name, if found; otherwise a null reference ( |
Returns
The value true if there exists a OpcDataField with the name specified (and field is set to that field); otherwise the value false.
Remarks
The name specified is compared using Ordinal.
Indexers
Item
| Overload | Description |
|---|---|
| this[int] | Gets the field at the index specified. |
| this[string] | Gets the field associated with the specified name. |
this[int]
Gets the field at the index specified.
public OpcDataField this[int index] { get; }Public ReadOnly Default Property this[](index As Integer) As OpcDataFieldParameters
| Name | Type | Description |
|---|---|---|
index | Int32 | The zero-based index which identifies the data field to get. |
Property value
An instance of the OpcDataField representing the field at the specified index, if existent; otherwise a null reference (Nothing in Visual Basic).
this[string]
Gets the field associated with the specified name.
public OpcDataField this[string name] { get; }Public ReadOnly Default Property this[](name As String) As OpcDataFieldParameters
| Name | Type | Description |
|---|---|---|
name | String | The name of the data field to get. |
Property value
An instance of the OpcDataField representing the field with the specified name, if existent; otherwise a null reference (Nothing in Visual Basic).

