python-opcua icon indicating copy to clipboard operation
python-opcua copied to clipboard

Subscribe data change

Open CodePythonFollow opened this issue 5 years ago • 6 comments

When the subscription data changes, the opc service is disconnected. Is there a corresponding callback function for processing.

CodePythonFollow avatar Dec 23 '20 05:12 CodePythonFollow

client or serverside?

AndreasHeine avatar Dec 23 '20 16:12 AndreasHeine

client

CodePythonFollow avatar Dec 24 '20 05:12 CodePythonFollow

there is no callback for a connection break!

or do you mean what happens with the data if i am not connected?

AndreasHeine avatar Dec 24 '20 08:12 AndreasHeine

When my subscription data changes, it may be timeout due to a long time. At this time, I have to restart the subscription, so dirty data will be generated and data may be lost.

CodePythonFollow avatar Dec 25 '20 09:12 CodePythonFollow

https://reference.opcfoundation.org/v104/Core/docs/Part4/6.7/

just as hint how you can implement your client reconnect! https://github.com/AndreasHeine/opcua-sub-to-websocket/blob/9f664cd2d6d7f3225ca7334f049c2ff5069ad755/client.py#L62

AndreasHeine avatar Dec 25 '20 10:12 AndreasHeine

Thank you. I used the same idea, asynchrony is a great optimization direction

CodePythonFollow avatar Dec 30 '20 07:12 CodePythonFollow