Ubuntu python-opcua Test


/*********************************************************************************
 *                        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))

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM