Skip to content

Commit

Permalink
update prosys crypto client
Browse files Browse the repository at this point in the history
  • Loading branch information
oroulet committed Dec 7, 2020
1 parent ac4373e commit e8eaa97
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions examples/client_to_prosys_crypto.py
@@ -1,22 +1,22 @@
import sys
sys.path.insert(0, "..")
import logging

from IPython import embed
import asyncio

from asyncua import Client


if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
async def main():
client = Client("opc.tcp://localhost:53530/OPCUA/SimulationServer/")
client.set_security_string("Basic256Sha256,Sign,certificate-example.der,private-key-example.pem")
try:
client.connect()
async with client:
root = client.nodes.root
objects = client.nodes.objects
print("childs og objects are: ", objects.get_children())
print("childs og objects are: ", await objects.get_children())
await asyncio.sleep(3)


embed()
finally:
client.disconnect()

if __name__ == "__main__":
logging.basicConfig(level=logging.WARN)
asyncio.run(main())

0 comments on commit e8eaa97

Please sign in to comment.