/*********************************************************************************
* Ubuntu python-opcua Test
* 说明:
* 测试一下python-opcua库。
*
* 2017-12-22 深圳 南山平山村 曾剑锋
********************************************************************************/
一、Python Lib
1. FreeOpcUa/python-opcua
https://github.com/FreeOpcUa/python-opcua
二、Test Code
1. Minimal client example: https://github.com/FreeOpcUa/python-opcua/blob/master/examples/client-minimal.py
2. Minimal server example: https://github.com/FreeOpcUa/python-opcua/blob/master/examples/server-minimal.py
三、Run Code
1. Server:
root@localhost:/home/zengjf/opcua# python3 server-minimal.py
Listening on 0.0.0.0:4840
Cleanup client connection: ('127.0.0.1', 44822)
2. Client
root@localhost:/home/zengjf/opcua# python3 client-minimal.py
Objects node is: Node(TwoByteNodeId(i=84))
Children of root are: [Node(NumericNodeId(i=85)), Node(NumericNodeId(i=86)), Node(NumericNodeId(i=87))]
myvar is: Node(NumericNodeId(ns=2;i=2))