Skip to content

decodeBinary

Canonical path: o6.decodeBinary

decodeBinary

decodeBinary(data, datatype)

Decode a binary-encoded OPC UA value.

Parameters:

Name Type Description Default
data bytes

The OPC UA Binary representation to read.

required
datatype type[_NativeT]

The expected type. The binary encoding carries no type information, so this cannot be inferred.

required

Returns:

Type Description
_NativeT

The decoded value of type datatype.

Raises:

Type Description
StatusCodeError

data is not a valid encoding of datatype.