【实例简介】

open ua统一标准指导文档,基于C语言的。包含了节点,函数,类型等基础说明。以及open ua服务器/客户端建立的一些基本实例。

Contents

1 Introduction

I1 OPC Unified Architecture

en62541 Features

1.3 Getting Hel

1. 4 Contributing

2 Building open 62541

2.1 Building the Examples

2.2 Building the library

2.3 Build Options

3 Tutorials

3.1 Working with Data Types

9

3.2 Building a Simple Server

3.3 Adding Variables to a Server

.13

3.4 Connecting a Variable with a Physical Process

.,,14

3.5 Working with Variable Types

3.6 Working with Objects and Object Types

19

3.7 Adding Methods to Objects

3.8 Building a Simple Client

4 Protocol

31

4.1 Establishing a Connection

4.2 Structure of a protocol message

5 Data Types

5.1 Builtin Types

5.2 Generic Type Handling

47

5.3 Array handling

49

5. 4 Random Number generator

49

5.5 Generated Data Type Definitions

49

5.6 Deprecated Data Types APl

94

6 Services

6.I D

97

6.2 Secure Channel service set

6.3 Session Service set

6.4 Node management Service Set

100

6.5 View Service Set

.,...100

6.6 Query Service Set

10

6.7 Attribute Service Set

102

6.8 Method Service set

102

6.9 MonitoredItem service set

103

6.10 Subscription Service Set

104

7 Information Modelling

l07

7.1 Base Node Attributes

107

7. 2 Variable Node

7.3 Variable TypeNode

7.4 MethodE

109

7.5 ObjectNode

110

7.6 ObjectTypeNode

l10

7.7 Reference'TypeNode

110

7.8 Data TypeNode

7.9 View Node

...112

7.10 Nodestore Plugin API

112

8 Server

I15

8.1 Server Configuration

8.2 Server Lifecycle

117

8.3 Repeated Callbacks

118

8.4 Reading and writing Node attributes

118

8.5B1

123

8.6 Discovery

124

8.7 Information model callbacks

8.8 Node addition and deletion

129

8.9 Reference Management

l34

8.10 Utility Functions

134

8.11 Deprecated Server API

134

9 Client

137

9.1 Client Lifecycle

137

9.2 Client Lifecycle callback

137

9.3 Subscription Inactivity callback

137

9. 4 Client Configurat

138

9.5 Connect to a Server

,,,,,,,.,,,,,138

9.6 Discovery

.139

9.7 Services

140

9.8 Asynchronous Services

143

10 Standard-Defined Constants

155

10.1 Attribute Id

10.2 Access Level masks

155

10.3 Write masks

156

10.4 Status Codes

156

10.5 Namespace Zero Nodelds

164

11 XML Nodeset Compiler

189

11.1 Getting started

189

11.2 Creating object instances

194

11.3 Combination of multiple nodesets

.195

12 Internals

199

12.1 Networking Plugin API

199

12.2 Access Control Plugin API

.202

12.3 Logging plugin APl

CHAPTER 1

Introduction

open62541(http://open62541.org)isanopensourceandfreeimplementationofOpcUa(opCunIfiedArchitec

ture)written in the common subset of the C99 and C++98 languages. The library is usable with all major compilers

and provides the necessary tools to impleinent dedicated OPC UA clients and servers, or to integrate OPC UA-

based communication into existing applications. open62541 library is platform independent. All platform-specifie

functionality is implemented via exchangeable plugins. Plugin implementations are provided for the major oper

ating systems

open62541 is licensed under the Mozilla Public License v2.0. So the open62541 library can be used in projects

that are not open source. Only changes to the open62541 library itself need to published under the same license

The plugins, as well as the server and client examples are in the public domain( Cco license). They can be reused

under any license and changes do not have to be published

1.1 OPC Unified Architecture

OPC UA is a protocol for industrial communication and has been standardized in the ieC 62541 series. At its

core. opc ua defines

an asynchronous protocol(built upon Tcp Http or Soap) thaT defines the exchange of messages via

sessions,(on top of)secure communication channels, (on top of)raw connections

a type system for protocol messages with a binary and XML-based encoding scheme,

a meta-model for information modeling, that combines object-orientation with semantic triple-relations, and

set of 37 standard services to interact with server-side information models. The signature of each service

is defined as a request and response message in the protocol type system

The standard itself can be purchased from IEC or downloaded for free on the website of the OPC Foundation at

https://opcfoundation.org/(youneedtoregisterwithavalidemail

The OPC Foundation drives the continuous improvement of the standard and the development of companion spec-

ifications Companion specifications translate established concepts and reusable components from an application

domain into OPC UA. They are created jointly with an established industry council or standardization body from

the application domain. Furthermore, the OPC Foundation organizes events for the dissemination of the standard

and provides the infrastructure and tools for compliance certification

open62541 Documentation, Release 0.3. dev

1.2 open62541 Features

open62541 implements the OPC Ua binary protocol stack as well as a client and server SDK. It currently supports

the micro embedded Device server Profile plus some additional features Server binaries can be well under lookb

in size, depending on the contained information nodel

· Communication stack

OPC UA binary protocol

Chunking(splitting of large messages)

Exchangeable network layer(plugin) for using custom networking APIs(e. g on embedded targets)

Encrypted communication

Asynchronous service requests in the client

· Information model

Support for all OPC UA node types(including method nodes)

Support for adding and removing nodes and references also at runtime

Support for inheritance and instantiation of object-and variable-types(custom constructor/destructor

instantiation of child nodes

Access control for individual nodes

Subscriptions

Support for subscriptions/monitoreditems for data change notifications

Very low resource consumption for each monitored value(event-based server architecture)

Code-Generation

Support for generating data types from standard XML definitions

Support for generating server-side information models(nodesets) from standard XMl definitions

Features on the roadmap for the 0.3 release series but missing in the initial v0. 3 release are

Encry pted communication in the client

Events(notifications emitted by objects, data change notifications are implemented

Event-loop(background tasks) in the client

1.3 Getting Help

For discussion and help besides this documentation, you can reach the open6254 1 community via

the mailing list

· our Irc channel

· the bugtracker

1.4 Contributing

As an open source project, we invite new contributors to help improve open62541. Issue reports, bugfixes and

new features are very welcome. The following are good starting points for new contributors

Report bugs

Improve the documentation

2

Chapter 1. Introduction

open62541 Documentation, Release 0.3. dev

Work on issues marked as easy hacks

1.4. Contributing

open62541 Documentation, Release 0.3. dev

Chapter 1. Introduction

CHAPTER

Building open62541

2.1 Building the Examples

USing the GCC compiler, the following calls build the examples on linux

p/path-tc/open62541*.# copy singie-file distr: but ion to the iocal directory

cp /path-tc/examples/server_variable c. copy the example server

gcc -std-c99 openc2541 c server variablec -o server

2.2 Building the Library

2.2.1 Building with CMake on Ubuntu or Debian

sudc apt-get install git buzld-essential gcc pkg-contig cmake python python-six

f enable addiLional eaLure

sudc apt-get install cmake-curses-gui for the ccmake graphical interface

dc apt-get install libmbedtls-dev for encryp

sudc apt-get install check for unit tests

sudc apt-get install python-sphinx graphviz t fcr documentation generation

cd cpen62541

f select additional features

make doc htmi documentation

nake doc_pdr pdr ciocumeniaLion (requires IdTeX

5

open62541 Documentation, Release 0.3. dev

2.2.2 Building with CMake on Windows

Here we explain the build process for Visual Studio(2013 or newer). To build with Ming w, just replace the

compiler selection in the call to CMake

Download and install

Python2.7.x(python3.xworksaswell):https://python.org/downloads

Install python-six with the pip package manager(pip install six)

CmakE:http://www.cmake.org/cmake/resources/software.html

MicrosoftVisualStudio:https://www.visualstudio.com/products/visual-studio-community-vs

Download the open I sources(using git or as a zipfile from github)

Open a command shell (cmd)and run

cd \openE254

mkdir build

cd build

\cmake. exe .. - Visual Studio 14 2015

You can useuse cmake-gui for a graphical uiser-interface tc seiect features

Then open buildopen62541 sln in Visual Studio 2015 and build as usual

2.2.3 Building on OS X

· Download and install

Xcodehttps://itunes.apple.com/us/app/xcode/id497799835?is=l&mt=12

He

omebrew:http://brew.sh/

Pip(a package manager for python, may be preinstalled): sudo easy install pip

Run the following in a shell

brew install cmake

f python 2/3 compatibility workarounds

pip insTall sphinx #for documentation generdLicn

pip install sphinx_rtdtheme documentation style

brew install grapaviz fcr graphics in the documentation

brew install check f for unit tests

brew install userspace-rcu for multi-threading support

Follow Ubuntu instructions without the apt-get commands as these are taken care of by the above packages

2.2.4 Building on Open BSD

The procedure below works on Open BSD 5. 8 with gcc version 4.8.4, cmake version 3. 2.3 and Python version

2.7.10.

Install a recent gcc, python and cmake

kg_add gcc py

Tell the system to actually use the recent gcc (it gets installed as egcc on OpenBSD)

export cc=egcc Cxx=eg++

Now procede as described for Ubuntu/Debian

6

Chapter 2. Building open62541

【实例截图】

【核心代码】

Linux编译open62541,open ua统一标准指导文档(ice 62541)相关推荐

  1. FreeRTOS官方指导文档阅读笔记

    FreeRTOS官方指导文档阅读笔记 基于 161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf,可 ...

  2. FLANN快速近似最邻近算法官方指导文档

    FLANN快速近似最邻近算法官方指导文档 Introduction Quick Start 快速学习 Downloading and compiling FLANN 下载和编译 Upgrading f ...

  3. golang中文文档_【译】Go 语言源码贡献官方指导文档

    以前给 Go 语言项目源码提交过一些 commits,期间阅读他们的官方指导文档的时候觉得这篇指导文档可以作为绝佳的关于大型软件项目的规范管理的参考,因为最近又提交了几个 commits,就又把这篇文 ...

  4. Linux内核:VFIO Mediated Device(vfio-mdev)内核文档(翻译)

    <ARM SMMU原理与IOMMU技术("VT-d" DMA.I/O虚拟化.内存虚拟化)> <提升KVM异构虚拟机启动效率:透传(pass-through).DM ...

  5. rhel6上使用udev配置oracle asm,Red Hat Enterprise Linux 6使用udev配置Oracle ASM总结文档

    1.概述 在Red Hat Enterprise Linux (RHEL)6以前,Oracle均是使用ASMLib这个内核支持库配置ASM. ASMLIB是一种基于Linux module,专门为Or ...

  6. linux文件管理系统开发毕业,定稿毕业论文基于Linux的远程管理系统服务器端的实现word文档(范文1)...

    <[毕业论文]基于Linux的远程管理系统服务器端的实现.doc>由会员分享,可免费在线阅读全文,更多与<(定稿)毕业论文基于Linux的远程管理系统服务器端的实现(word文档)& ...

  7. [css] 什么是脱离文档流?有什么办法可以让元素脱离标准的文档流?

    [css] 什么是脱离文档流?有什么办法可以让元素脱离标准的文档流? 文档流就是指元素在 HTML 文档中位置顺序决定排布的过程.HTML 元素有块级元素和行内元素,块级元素一个占一行,行内元素在一行 ...

  8. pinia中文文档 指导文档中文翻译版 pinia指导中文翻译

    Pinia 指导文档 中 文 翻 译 版 翻译者:jcLee95 Pinia 指导手册中文翻译地址(本文): https://blog.csdn.net/qq_28550263/article/det ...

  9. 写一个可以一键统一调整word文档格式的程序

    要写一个可以一键统一调整 Word 文档格式的程序,可以使用 Microsoft Office Word 的 VBA 功能来实现. 步骤如下: 打开 Word 文档,在菜单栏中点击"开发人员 ...

最新文章

  1. 一些大佬博客里的个签
  2. K - Anton and Lines CodeForces - 593B
  3. python 自己写个调试工具
  4. Java的最大优势还是跨平台么?
  5. Windows 技术篇-减少对视频相关服务的cpu分配,减少cpu占用率
  6. android 版本更新工具类_报表分析工具FastReport .Net 2021年超大版本更新,实现了对.NET 5的支持...
  7. Web前端笔记-element ui中table中禁止换行,使用...进行省略
  8. java图像风格迁移_多说迁移,Java开发模仿自主实现评论(一)
  9. 迁移学习中使用下载好的权重
  10. PHP 变量 与 运算符
  11. 贴片发光二极管/LED灯正负极判断
  12. mysql查询男女平均年龄_mysql查询练习(三)
  13. Python学习-安装Anaconda及print我爱王晓静
  14. 项目管理必备工具——甘特图
  15. Activiti 学习笔记八:排他网关(ExclusiveGateWay)
  16. GD32E230 ADC注入通道
  17. 直播相关知识之二 采集、处理、编码和封装
  18. 科技公司揭露撑持权力
  19. html css实现文本水平垂直居中显示
  20. 自学软件测试该如何入门?

热门文章

  1. 判断文档是office打开,还是WPS打开
  2. 哪种类型耳机不伤耳朵,这几款骨传导耳机推荐给大家
  3. 非计算机专业学java好找工作吗_非计算机专业学习java容易找工作吗?
  4. 为知笔记服务端docker镜像使用说明
  5. 【如何学习一本书】—第一遍
  6. 英语语法日记Day3——并列句
  7. html怎么给音乐添加id,怎么给录音添加背景音乐 剪辑录音并且配上背景音乐
  8. Android-百度地图定位实现仿钉钉签到打卡功能(附源码)
  9. 新数科技入驻华为云严选商城,以技术创新驱动企业云化升级
  10. axure9中继器实现数据动态新增/编辑/删除