Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcDataObject type exposes the following members.
Initializes a new instance of the OpcDataObject class using the type information of the dataType
specified.
C#
public OpcDataObject(OpcDataTypeInfo dataType)
Parameters
dataType
OpcDataTypeInfo
The OpcDataTypeInfo of the structured data type to represent.
Exceptions
The dataType
is not a structured data type (see IsStruct).
The dataType
is a null reference (Nothing in Visual Basic).
Gets the field associated with the specified name
.
C#
public OpcDataField this[string name] { 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).
Searches for the field with the specified name
.
C#
public OpcDataField GetField(string name)
Parameters
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.
Returns all the fields of the current OpcDataObject.
C#
public OpcDataField[] GetFields()
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.
Gets the OpcDataTypeInfo of the current structured data type instance represented.
C#
public OpcDataTypeInfo GetTypeInfo()
Returns
The OpcDataTypeInfo of the current structured data type instance.
Determines whether the current OpcDataObject provides a OpcDataField with the Name equals to the name
specified.
C#
public bool HasField(string name)
Parameters
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.
Searches for the field associated with the name
specified.
C#
public bool TryGetField(string name, out OpcDataField field)
Parameters
name
String
The String containing the name of the data field to get.
field
OpcDataField
The OpcDataField representing the field with the specified name, if found; otherwise a null reference (Nothing in Visual Basic).
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.