论技术领域学好英文的重要性

本文档介绍了OPC UA软件开发工具包(SDK),包括其在.NET编程环境中的应用,提供了服务器、客户端和发现服务器的接口,以及Web服务的实现。SDK包含了用于构建UA应用程序的库、应用程序和源代码,支持多种协议和堆栈配置文件。此外,文档还详细阐述了客户端、服务器和发现服务器的交互,以及Web服务的使用。开发者应具备.NET和C#基础知识,以及对Windows Communication Foundation的理解。
摘要由CSDN通过智能技术生成

OPCUASDKHelp

 

 

 

 

 

 

 

 

 

 

 

封页

 

 

 

 

Welcome to the UA SDK(欢迎使用UA SDK)

//欢迎使用统一体系结构软件开发工具包

Welcome to the Unified Architecture Software Development Kit

 

// uasdk是一组接口、库和可执行文件,允许开发人员使用.NET编程环境快速创建UA应用程序。SDK包括:

The UA SDK is a set of interfaces, libraries and executables that allow developers to quickly create UA applications with the .NET programming environment. The SDK includes:

 

// XML Web服务和UA本机二进制堆栈配置文件的实现;

Implementations of the XML Web Services and UA Native Binary stack profiles;

 

//服务器和客户端开发工具包;

Server and Client development toolkits;

 

//样品应用;

Sample Applications;

 

//用于服务器的AEDA-051.00和AEDA-051.00;

A wrapper for COM-DA Servers (DA 2.05a, DA3.00 and AE1.1);

 

// COM-DA和COM-AE客户端的代理(DA 2.05a和AE1.1);

A proxy for COM-DA and COM-AE clients (DA 2.05a and AE1.1);

 

//本地发现服务器;

Local Discovery Server;

 

//配置工具

Configuration Tool

 

//示例应用程序随源代码提供。堆栈和开发工具包仅作为二进制文件提供。

The sample applications are available with source code. The stack and development toolkits are available only as binaries.

 

// In This Section

在本节中

 

//本文档概述了UA软件开发工具包(SDK)。它讨论了体系结构、与SDK和工具箱api一起分发的组件。

This document provides an overview of the UA Software Development Kit (SDK). It discusses architecture, components distributed with the SDK and toolkit APIs.

 

// UA-SDK是为不同的开发环境而发布的。本文档主要描述使用.NET Framework的SDK,但是,许多通用概念适用于所有版本的SDK。

The UA SDK is distributed for different development environments. This document primarily describes the SDK that uses the .NET Framework, however, many of the general concepts apply to all versions of the SDK.

 

//读者应熟悉Microsoft.NET和C#的术语,以及Windows Communication Foundation(WCF)背后的基本概念。

The reader is expected to be familiar with Microsoft .NET and C# terminology as well as the basic concepts behind the Windows Communication Foundation (WCF).

 

//本文并没有详尽地描述SDK中的每个类。它旨在补充visualstudiointellisense文档,帮助开发人员了解如何开发生产服务器、客户机和DCOM代理/包装器。

This document does not exhaustively describe every class in the SDK. It is intended to supplement the Visual Studio intellisense documentation and help developers understand how to develop production server, client and DCOM proxy/wrapper.

 

//相关章节

Related Sections

 

//介绍

Introduction

 

//入门教程

Getting Started Tutorial

 

//基本编程

Basic Programming

 

//功能详细信息

Feature Details

 

//指导方针和最佳做法

Guidelines and Best Practices

 

// DCOM互操作性

DCOM interoperability

 

//示例应用程序

Sample Applications

 

//可交付成果

Deliverables

 

//工具

Tools

 

//发行说明

Release Notes

 

//许可协议

License agreement

 

//反馈和社区

Feedback and Community

Introduction(介绍)

// UA软件开发工具包(SDK)是一个库、应用程序和源代码的集合,允许开发人员构建UA应用程序。

The UA Software Development Kit (SDK) is a collection of libraries, applications and source code that allow developers to build UA applications.

 

// Related Sections

相关章节

 

//概述

Overview

 

//客户端、服务器和发现服务器

Clients, Servers and Discovery Servers

 

//Web服务

Web Services

Overview(概述)

 

//UA软件开发工具包(SDK)是一个库、应用程序和源代码的集合,允许开发人员构建UA应用程序。图1说明了SDK、网络和应用程序之间的接口。

The UA Software Development Kit (SDK) is a collection of libraries, applications and source code that allow developers to build UA applications. Figure 1 illustrates the interfaces between the SDK, the network and the applications.

 

UA有线协议

传输协议

安全协议

消息编码

堆栈 API

客户端/服务器 工具集

工具API

组件对象 代理/包装器

OPC应用程序

OPC组件对象API

组件对象应用程序

 

// UA SDK中的软件接口

Software Interfaces in the UA SDK

 

//堆栈API将wire协议的细节封装在一组类和接口之后。这些接口实现了[UA UASPECPart 4]中定义的所有UA服务作为方法调用。使用堆栈API构建的应用程序不直接依赖于wire协议,并且支持堆栈支持的所有协议。

The Stack API encapsulates the details of the wire protocol behind a set of classes and interfaces. These interfaces implement all of the UA services defined in [UA UASPECPart 4] as method calls. Applications which are built with the Stack API do not have any direct dependencies on the wire protocol and support all protocols which are supported by the Stack.

 

// UA中使用的每个有线协议都是消息编码、安全协议和传输协议的组合。这些组合称为堆栈配置文件,它们在[UA UASPECPart 7]中定义。堆栈尽可能利用开发环境提供的特性(例如,堆栈使用WS-Secure Conversation实现,它是.NETFramework3.0的一部分)。

Each wire protocol used in UA is a combination of a messaging encoding, a security protocol and a transport protocol. These combinations are called Stack Profiles and they are defined in [UA UASPECPart 7]. The Stack makes use of features provided by the development environment whenever possible (e.g. the Stack uses the WS-Secure Conversation implementation which is a part of .NET Framework 3.0).

 

//该堆栈提供了wire协议的实现以及各种helper类,但不包含任何应用程序级代码。因此,UA-SDK还提供了工具包,这些工具包实现了所有UA应用程序所共有的特性。这些工具箱构建在堆栈API之上,并公开第二个API(称为ToolkitAPI)。ToolkitAPI的设计易于使用,使用它的应用程序将与Toolkit紧密耦合。客户端的工具箱API也称为UA客户端API。类似地,服务器的工具箱API称为UA服务器API。

The Stack provides an implementation of the wire protocol(s) plus a variety of helper classes but does not contain any application level code. For this reason the UA SDK also provides toolkits which implement features which are common to all UA applications. These toolkits are built on top of the Stack API and expose a second API (called the Toolkit API). The Toolkit API is designed ease of use and applications which use it will be tightly coupled to the Toolkit. The Toolkit API for the Client is also called the UA Client API. Similarly, the Toolkit API for a Server is called the UA Server API.

 

// COM代理和包装器是使用工具箱构建的UA应用程序,这些工具箱使用COM接口与现有的OPC COM应用程序进行通信。代理是允许COM客户端与UA服务器通信的COM服务器。包装器是允许UA客户端与COM服务器通信的COM客户端。请注意,COM包装器/代理是使用SDK构建的应用程序的示例,而不是SDK本身的一部分。

The COM Proxies and Wrappers are UA Applications built with the Toolkits that use COM interfaces to communicate with existing OPC COM applications. The Proxies are COM Servers that allow COM Clients to communicate with UA Servers. The Wrappers are COM Clients that allow UA Clients to communicate with COM Servers. Note that the COM wrappers/proxies are examples of applications built with the SDK and not part of the SDK itself.

 

//图2说明了使用SDK构建的UA应用程序如何通过网络相互交互。

Figure 2 illustrates how UA applications built with the SDK interact with each other over a network.

 

图2:使用SDK构建的UA应用程序之间的交互

服务器必须在其计算机上向发现服务器注册

OPC 组件对象服务

D组件对象

UA堆栈
UA服务工具

UA组件对象包装

UA堆栈
UA服务工具

UA服务应用程序

UA堆栈
UA本地发现服务器

UA堆栈API

SOAP简单对象访问协议
HTTP超文本传输协议
UA TCP协议

UA堆栈API

UA客户端应用程序
UA客户端工具

UA堆栈

UA组件对象
UA客户端工具

UA堆栈

D组件对象

OPC组件对象客户端

 

 

 

 

 

 

// UA本地发现服务器(LDS)是一个特殊的应用程序,它允许远程客户端发现存在于一台机器上的UA服务器。在计算机上运行的所有UA服务器都应该使用堆栈API向UA本地发现服务器注册。UA本地发现服务器是与SDK一起分发的独立可执行文件。

A UA Local Discovery Server (LDS) is a specialized application which allows remote Clients to discover the UA Servers that exist on a single machine. All UA Servers running on a machine should register with the UA Local Discovery Server using the Stack API. The UA Local Discovery Server is a standalone executable that is distributed with the SDK.

Clients, Servers and Discovery Servers(客户端、服务器和发现服务器)

// UA应用程序有三种类型:客户端、服务器和发现服务器。服务器应用程序提供对底层实时进程生成的数据和事件的访问,发现服务器提供有关网络上可用服务器的信息,客户端使用发现服务器识别可用服务器并使用服务器提供的数据和事件。一些UA应用程序将是客户端和服务器。不同类型的应用程序之间的关系如图1所示。

There are three types of UA applications: Clients, Server and Discovery Servers. Server applications provide access the data and events produced by an underlying real-time process, Discovery Servers provide information about Servers that are available on a network and Clients recognize available servers using discovery servers and consume the data and events provided by Servers. Some UA applications will be a Client and a Server. The relationships between the different types of applications are illustrated in Figure 1.

 

图1:UA应用程序之间的关系

服务器向发现服务器注册

本地发现服务器

服务器

发现服务器向其他发现服务器注册

客户端使用发现服务器搜索服务器

客户端与服务器创建会话

全局发现服务器

客户端

 

 

 

 

// SDK提供的接口和类允许开发人员创建上述任何类型的UA应用程序。

The SDK provides the interfaces and classes that allow developers to create any of the mentioned above types of UA Applications.

 

// SDK还包括UA本地发现服务器(LDS)的实现,该服务器允许客户端发现与LDS在同一主机上运行的服务器。服务器可以使用SDK中定义的api向LDS注册自己。开发人员还可以创建自己的发现服务器,这些服务器了解网络上的机器和/或服务器。

The SDK also includes an implementation of the UA Local Discovery Server (LDS) which allows Clients to discover Servers running on the same host as the LDS. Servers can register themselves with the LDS using APIs defined in the SDK. Developers may also create their own Discovery Servers which have knowledge of the machines and/or servers on the network.

Web Services(Web服务)

// WCF编程模型允许应用程序开发人员创建交换SOAP消息的应用程序。

The WCF programming model allows application developers to create applications which exchange SOAP messages.

WCF Implementation(windows组件模型基金会实施)

// WCF编程模型允许应用程序开发人员创建交换SOAP消息的应用程序。

The WCF programming model allows application developers to create applications which exchange SOAP messages.

 

// UA SDK是使用Windows Communication Foundation(WCF)构建的,后者是.NET Framework 3.0及更高版本的一部分。。编程模型如图1所示。

The UA SDK is built using the Windows Communication Foundation (WCF) which is part of the .NET Framework Version 3.0 and later.. The programming model is illustrated in Figure 1.

 

图1:WCF编程模型

服务器

结束点:

地址

绑定端口

合约

结束点:

地址

绑定端口

合约

通道
消息

客户端

 

 

 

 

//启动消息交换的应用程序称为WCF客户端,等待传入消息的应用程序称为WCF服务(请注意,WCF中术语“服务”的使用不同于UA中的术语使用。UA服务相当于WCF操作)。

An application which initiates a message exchange is called the WCF Client and the application which waits for incoming messages is called a WCF Service (Note that the use of the term ‘Service’ in WCF is different from the use of the term in UA. A UA Service is equivalent to a WCF Operation).

 

// WCF服务可以公开表示网络上可寻址位置的一个或多个WCF端点。每个WCF端点都由一个地址、一个绑定和一个协定来描述。地址指定发送消息的位置。绑定描述了如何发送消息。合同描述了信息包含的内容。WCF客户端需要知道这些信息,然后才能访问WCF服务。

A WCF Service may expose one or more WCF Endpoints which represent an addressable location on the network. Each WCF Endpoint is described by an address, a binding and a contract. The address specifies where to send messages. The binding describes how to send messages. And the contract describes what the messages contain. WCF Clients need to know this information before they can access a WCF Service.

 

// WCF合同有4个部分:ServiceContract、OperationContract、MessageContract和DataContract。ServiceContract定义WCF端点支持的操作。它被实现为一个用ServiceContract属性修饰的接口。OperationContract定义了客户端可以启动的单个消息交换。OperationContract可以定义单个消息或请求-响应消息对(UA应用程序仅使用请求-响应消息对)。它被实现为用OperationContract属性修饰的方法。MessageContract定义操作期间交换的SOAP消息体。它被实现为一个用MessageContract属性修饰的类。DataContract描述消息中的一个参数,也作为类实现。

A WCF contract has 4 parts: a ServiceContract, an OperationContract, a MessageContract and a DataContract. The ServiceContract defines the operations supported by an WCF Endpoint. It is implemented as an interface decorated with the ServiceContract attribute. The OperationContract defines a single message exchange that a Client may initiate. An OperationContract may define a single message or a request-response message pair (UA applications only use request-response message pairs). It is implemented as method decorated with OperationContract attribute. A MessageContract defines the body of a SOAP message exchanged during an operation. It is implemented as a class decorated with MessageContract attribute. The DataContract describes a parameter in the message and is also implement as a class.

 

// WCF通道是可用于交换多个消息的逻辑网络连接。WCF客户端在连接到终结点时必须创建WCF通道。当创建通道时,协商安全令牌,并分配一个唯一标识符。应用程序使用此标识符将UA会话与特定的WCF通道相关联。在任何给定时间,单个UA会话只能通过一个WCF通道访问。如果WCF通道因任何原因关闭(例如网络中断),客户端必须创建一个新的WCF通道,并通过调用ActivateSession服务将其与UA会话关联。

A WCF Channel is logical network connection that can be used to exchange multiple messages. A WCF Client must create a WCF Channel when it connects to an Endpoint. When a channel is created the security tokens are negotiated an a unique identifier is assigned. This identifier is used by the application to associate a UA session with a particular WCF channel. A single UA session can only be accessed via one WCF channel at any given time. If the WCF channel is closed for any reason (e.g. a network interruption) the client must create a new WCF channel and associate it with UA Session by calling the ActivateSession service.

 

//关于WCF编程模型的更多信息可以在微软提供的MSDN文档中找到。

More information on the WCF programming model can be found in the MSDN documentation provided by Microsoft.

Glossary(词汇表)

Basic Programming(基本编程)

//本节介绍创建OPC统一体系结构应用程序的基本原理。

This section presents the fundamentals for creating OPC Unified Architecture applications.

//在本节中

In This Section

 

//配置DCOM

Configuring DCOM

 

//描述如何配置COM包装器和COM代理

Describes how to configure the COM Wrapper and the COM Proxy

Server

Overview(概述)

// SDK提供的服务器工具包实现了所有UA服务器通用的功能。它被设计成可扩展的,并允许集成来自许多不同来源的数据和事件。

The Server toolkit provided by the SDK implements the features which are common to all UA servers. It is designed to be extensible and allow the integration of data and events from many different sources.

 

//要使用SDK提供生产服务器,开发人员必须实现以下功能:

To provide a production server using the SDK the developers have to implement the following functionality:

 

//公开一个或多个终结点,每个端点使用选定的平台环境公开一个或多个服务操作。

Exposes one or more endpoints, each of which exposes one or more service operations using selected platform environment.

 

//安全环境;(认证、授权、证书维护、安全策略和模式)

Security environment; (authentication, authorization, certificates maintenance, security policies and modes )

 

//配置维护;

Configuration maintenance;

 

//连接处理(端点管理、协议等)。

Connections handling (endpoints management, protocols, ..).

 

//地址空间和命名空间管理。

Address space and namespaces management.

 

//底层实时进程互操作性(读写数据、通信基础设施管理)。

Underlying real-time process interoperability (read and write data, communication infrastructure management).

 

// AE包装器提供了使用sdkapi实现这些函数所需的步骤的介绍性理解。

AE Wrapper provides an introductory understanding of the steps required to implement theise functions using the SDK API.

Architecture(建筑)

//模型

Model

 

// ServerSDK中的类如图1所示。

The classes in the Server SDK are shown in Figure 1.

Client(客户端)

Overview(概述)

//客户机SDK旨在通过处理所有客户机需要执行的标准任务来促进客户机开发。任务包括:

The Client SDK is designed to facilitate client development by handling the standard tasks which all clients need to do. The tasks include:

 

//发送会话保持活动请求

sending the session keep alive requests

 

//管理发布管道

managing the publish pipeline

 

//跟踪订阅和监视项目的当前状态

keeping track of the current status for subscription and monitored items

 

//管理客户端节点缓存

managing a client side node cache

 

//处理和缓存传入的数据更改和事件通知

processing and caching incoming data change and event notifications

 

//保存和恢复包括订阅和监视项的会话状态

saving and restoring the session state including the subscriptions and monitored items

 

//客户机SDK中的类如图1所示。

The classes in the Client SDK are shown in Figure 1.

 

使用

订阅

监控项状态

监控项

类型表

节点缓存

命名空间列表

会话

 

Sessions(会话)

// Session类继承自SessionClient,这意味着所有的UA服务都可以作为Session对象上的方法访问。

The Session class inherits from the SessionClient whic

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值