Skip to content

Reference

OpcRawObject Members

Represents the value of a structured data type which could not be decoded, as its sender encoded it.

Reference

OpcRawObject Members ​

Type
OpcRawObject
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Properties ​

Encoding ​

Gets the encoding in which the value is encoded.

csharp
public OpcEncoding Encoding { get; }
vbnet
Public ReadOnly Property Encoding As OpcEncoding

Property value

OpcEncoding

An instance of the OpcEncoding class whose Id identifies the encoding of the data type and whose Type states whether the RawData is binary or XML encoded.

RawData ​

Gets the encoded value.

csharp
public object RawData { get; }
vbnet
Public ReadOnly Property RawData As Object

Property value

Object

An array of byte values if the Encoding is Binary; or an XmlElement if it is Xml.

Methods ​

Decode ​

Decodes the RawData as the T defined.

csharp
public T Decode<T>(OpcContext context) where T : new()
vbnet
Public Function Decode(Of T As New)(context As OpcContext) As T

Type parameters

NameDescription
TThe type to decode with a default constructor.

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to decode the RawData.

Returns

T

A new instance of the type defined by T and decoded with the information in the RawData.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context is a null reference (Nothing in Visual Basic).
OpcExceptionThe decoding has failed. For more details exception data.

Remarks

This method is equivalent to Decode.

GetTypeInfo ​

Gets the OpcDataTypeInfo of the data type of the value represented.

csharp
public OpcDataTypeInfo GetTypeInfo()
vbnet
Public Function GetTypeInfo() As OpcDataTypeInfo

Returns

OpcDataTypeInfo

An OpcDataTypeInfo whose IsUnknown is true and which provides the Encoding and, of an XML encoded value, the name of the data type. As an encoded value does not state its data type, the TypeId is Null.

Remarks

A client that knows the data type provides it by its GetDataType method with the Encoding of the value.

ToString ​

override

Returns a string representing the Encoding of the current OpcRawObject.

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

A string representing the current OpcRawObject.

Overrides

ToString()