没有合适的资源?快使用搜索试试~ 我知道了~
open ua统一标准指导文档(ice 62541)
3星 · 超过75%的资源 需积分: 19 59 下载量 128 浏览量
2018-03-09
09:32:24
上传
评论 1
收藏 718KB PDF 举报
温馨提示
试读
209页
open ua统一标准指导文档,基于C语言的。包含了节点,函数,类型等基础说明。以及open ua服务器/客户端建立的一些基本实例。
资源推荐
资源详情
资源评论
open62541 Documentation
Release 0.3.0dev
The open62541 authors
Mar 06, 2018
Contents
1 Introduction 1
1.1 OPC Unified Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 open62541 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Building open62541 5
2.1 Building the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Building the Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Build Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Tutorials 9
3.1 Working with Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Building a Simple Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Adding Variables to a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Connecting a Variable with a Physical Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5 Working with Variable Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 Working with Objects and Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.7 Adding Methods to Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.8 Building a Simple Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4 Protocol 31
4.1 Establishing a Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 Structure of a protocol message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5 Data Types 35
5.1 Builtin Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
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 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6 Services 97
6.1 Discovery Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.2 SecureChannel Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
6.3 Session Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.4 NodeManagement Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.5 View Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.6 Query Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.7 Attribute Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
i
6.8 Method Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.9 MonitoredItem Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.10 Subscription Service Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
7 Information Modelling 107
7.1 Base Node Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
7.2 VariableNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
7.3 VariableTypeNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
7.4 MethodNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
7.5 ObjectNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
7.6 ObjectTypeNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
7.7 ReferenceTypeNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
7.8 DataTypeNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
7.9 ViewNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
7.10 Nodestore Plugin API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8 Server 115
8.1 Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
8.2 Server Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.3 Repeated Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
8.4 Reading and Writing Node Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
8.5 Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
8.6 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
8.7 Information Model Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
8.8 Node Addition and Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
8.9 Reference Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
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 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
10.2 Access Level Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
10.3 Write Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
10.4 StatusCodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
10.5 Namespace Zero NodeIds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
ii
CHAPTER 1
Introduction
open62541 (http://open62541.org) is an open source and free implementation of OPC UA (OPC Unified Architec-
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 implement dedicated OPC UA clients and servers, or to integrate OPC UA-
based communication into existing applications. open62541 library is platform independent. All platform-specific
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 (CC0 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
• a 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/ (you need to register with a valid email).
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.
1
剩余208页未读,继续阅读
资源评论
- m0_373689002018-06-07不知道内容
yqw12358
- 粉丝: 2
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功