freeopcua-master
所属分类:其他
开发工具:C/C++
文件大小:3505KB
下载次数:55
上传日期:2017-06-20 17:29:20
上 传 者:
sand726
说明: OPC UA server
OPC ua使用复杂的而非简单数据的更广范围的应用程序(MES、ERP和资产管理等)
(OPC UA uses a wide range of applications that are complex rather than simple data (MES, ERP, and asset management))
文件列表:
.travis.yml (811, 2017-06-16)
AUTHORS (130, 2017-06-16)
CMakeLists.txt (19429, 2017-06-16)
COPYING (7651, 2017-06-16)
ChangeLog (0, 2017-06-16)
Dockerfile (659, 2017-06-16)
Makefile.am (20339, 2017-06-16)
NEWS (0, 2017-06-16)
StatusCodes.csv (4982, 2017-06-16)
astylerc (210, 2017-06-16)
autogen.sh (28, 2017-06-16)
build.sh (47, 2017-06-16)
configure.ac (2400, 2017-06-16)
debian.soft (354, 2017-06-16)
debian (0, 2017-06-16)
debian\changelog.in (151, 2017-06-16)
debian\compat (2, 2017-06-16)
debian\control (1959, 2017-06-16)
debian\copyright (1307, 2017-06-16)
debian\docs (12, 2017-06-16)
debian\libopcuacore-dev.dirs (12, 2017-06-16)
debian\libopcuacore-dev.install (36, 2017-06-16)
debian\libopcuacore.dirs (8, 2017-06-16)
debian\libopcuacore.install (33, 2017-06-16)
debian\manpage.1.ex (1669, 2017-06-16)
debian\opcuaclient-dev.dirs (12, 2017-06-16)
debian\opcuaclient-dev.install (36, 2017-06-16)
debian\opcuaclient.dirs (8, 2017-06-16)
debian\opcuaclient.install (77, 2017-06-16)
debian\opcuaprotocol-dev.dirs (12, 2017-06-16)
debian\opcuaprotocol-dev.install (63, 2017-06-16)
debian\opcuaprotocol.dirs (8, 2017-06-16)
debian\opcuaprotocol.install (57, 2017-06-16)
debian\opcuaserver-dev.dirs (12, 2017-06-16)
debian\opcuaserver-dev.install (21, 2017-06-16)
... ...
Open Source C++ OPC-UA Server and Client Library
========
[![Build Status](https://travis-ci.org/FreeOpcUa/freeopcua.svg?branch=master)](https://travis-ci.org/FreeOpcUa/freeopcua)
LGPL OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python.
Python bindings can be found in the python directory.
code: https://github.com/FreeOpcUa/freeopcua
website: http://freeopcua.github.io/
mailing list: https://groups.google.com/forum/#!forum/freeopcua
Currently supported:
* read, write, browse
* translateBrowsePathToNodeId
* DataChange Events
* Events
* Subscriptions
* complete opc-ua address space generated from xml specification
* Method call from client
* Linux and Windows(VS13) support
Work in progress
* StatusChange Events
* Filtering
* Documentation
* Automatic generation of binary protocol from OPC schema files
* * Methods on server side
Not implemented yet (patches are welcome)
* History
* Security: Authentication, Certificates handling, ..
## Usage
Documentation is sparse but several examples are availables:
C++ examples in https://github.com/FreeOpcUa/freeopcua/tree/master/src/examples
Python examples in https://github.com/FreeOpcUa/freeopcua/tree/master/python/src
https://github.com/FreeOpcUa/freeopcua/blob/master/python/tests/test_highlevel.py can also be a usefull source of information
### Example minimal client in python
```
client = opcua.Client(False)
client.connect("opc.tcp://10.10.10.4:4841/OPCUA/AnyServer/")
objects = client.get_objects_node()
print("Children of objects are: ", objects.get_children())
var = objects.get_child(["3:AnObject", "AVariable"])
print("Value of variable is: ", var.get_value())
client.disconnect()
```
## Tested clients and servers with default settings
* uaexperts client application
* node-opcua (client and server tested)
* ignition server
* Beckhoff PLC (seems to be some issues, but mostly working)
* ignition open-source sdk (server tested)
* quickopc client sdk
* prosysopc demo client
* prosysopc demo server
* unified automation sdk (client and server tested)
## Installation
An environment supporting c++11 is necessary: gcc-4.8+, clang 3.4 or VS2013
#### Ubuntu (Debians)
There is a script debian.soft in the root for installing all required soft to build all repositories.
#### Using GNU autotools
```sh
autoreconf -f -i
./configure --prefix=/path/to/server
make
make check
make install
cd /path/to/server
LD_LIBRARY_PATH=./lib ./bin/opcuaserver
```
### Using cmake
#### Linux
```sh
mkdir build
cd build
cmake ..
make
make test
```
#### Windows
Boost and libxml2 are necessary
```
rem compiling
mkdir build
cd build
cmake .. -DBOOST_ROOT=c:\boost_1_56
cmake --build
ctest -C Debug
cd bin\Debug
example_server.exe
```
#### Docker
```
docker build .
```
## Developement
C++ style
* 2 spaces not tab
* CamelCase
* Local variables start with small letter
* Global/member variables starts with capital letters
* Use provided automatic formatter ([Artistic Style](http://astyle.sourceforge.net)) by invoking ``./restyle``
python code and API should follows PEP8 (many places should be fixed)
Address space and most protocol code are auto-generated and should not be modified directly. Every auto-generated file starts with a mention that it should not be edited.
There's a lot of old hand written protocol code left that should use the auto-generated code. This is done by uncommenting struct names in schemas/generate_protocol.py and removing old code and files in src/protocol and include/opc/ua/protocol/
近期下载者:
相关文件:
收藏者: