Skip to content

encodeBinary

Canonical path: o6.encodeBinary

encodeBinary

encodeBinary(obj)

Encode an OPC UA value with the binary encoding.

Parameters:

Name Type Description Default
obj Any

One scalar value of a registered OPC UA type: a builtin, a generated structure, or a generated enumeration.

required

Returns:

Type Description
bytes

The OPC UA Binary representation of obj.

Raises:

Type Description
TypeError

obj is not a scalar value of a registered OPC UA type.

StatusCodeError

open62541 rejected the value.