Skip to content

Parse TCP Payload containing OPC UA Data #1493

Answered by schroeder-
philipempl asked this question in Q&A
Discussion options

You must be logged in to vote

The full code for decoding is in https://github.com/FreeOpcUa/python-opcua/blob/master/opcua/common/connection.py.
This is complex because there is security settings and chunking.

If you only want to decrypt ExtensionObjects you can use this function:

from opcua.ua.ua_binary import  extensionobject_from_binary
data = b'......'
buffer = ua.utils.Buffer(data)
ext_obj = extensionobject_from_binary(buffer)

Anyway you have to load the extension objects from the server first. See: client.load_type_definitions()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by philipempl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants