Commit 9901b804 authored by oroulet's avatar oroulet

make example client renew connectin every two seconds for debugging

parent bcda0ac3
......@@ -9,11 +9,13 @@ from asyncua import Client
async def main():
client = Client("opc.tcp://localhost:53530/OPCUA/SimulationServer/")
client.set_security_string("Basic256Sha256,Sign,certificate-example.der,private-key-example.pem")
client.session_timeout = 2000
async with client:
root = client.nodes.root
objects = client.nodes.objects
print("childs og objects are: ", await objects.get_children())
await asyncio.sleep(3)
while True:
print("childs og objects are: ", await objects.get_children())
await asyncio.sleep(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment