Is there a function or method for decoding OPC-UA extension objects to readable form

Question:

UaExpert is displaying this array as follows:

enter image description here

Is there any way to decode this extension object to a readable form? My output is the following. I done some research and the question has been raised but I haven’t found any examples. Using the dict function gets you part way there but some of the items are returned as bytes.

{'TypeId': NumericNodeId(ns=2;i=543214), 'Encoding': 1, 'Body': b'x1bx00x00x00External Application Closedx13x00x00x0025/01/2023 12:40:56x05x00x00x00dfiusx00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00', '_freeze': True}
Asked By: David Filler

||

Answers:

You can load the type definition with the following method:

await client.load_type_definitions() 

The complete Sample can be found here:

Answered By: SFriedl
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.