# Official OPC UA .Net Standard Samples from the OPC Foundation
## Overview
Sample Servers and Clients, including all required controls, for .NET Framework 4.6.2, .NET Core 2.0 and UWP.
Integrates the offical OPC UA [NuGet](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/) package containing the OPC UA reference implementation targeting [.NET Standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard).
.Net Standard allows you develop apps that run on all common platforms available today, including Linux, iOS, Android (via Xamarin) and Windows 7/8/8.1/10 (including embedded/IoT editions) without requiring platform-specific modifications.
Furthermore, cloud applications and services (such as ASP.Net, DNX, Azure Websites, Azure Webjobs, Azure Nano Server and Azure Service Fabric) are also supported.
## For more information and license terms, see [here](http://opcfoundation.github.io/UA-.NETStandard).
## Features included
1. Sample Servers and Clients, including all required controls, for .Net 4.6, .NetCore 2.0 and UWP.
2. Sessions (including UI support in the samples).
3. Subscriptions (including UI support in the samples).
4. OPC UA [Aggregation Server](Workshop/Aggregation/README.md).
5. [OPC Classic adapter for OPC UA](ComIOP/README.md).
6. OPC UA [Global Discovery Client and Global Discovery Server](Samples/GDS/README.md).
7. OPC UA [Xamarin Client](Samples/XamarinClient/readme.md).
8. OPC UA [Quickstart Samples](Workshop).
9. The Core UA stack and SDK has been tested with Mono 5.4 to add support for the [Xamarin Client](Samples/XamarinClient/readme.md) and the Mono console application samples.
## Project Information
### General Project Info
[![Github top language](https://img.shields.io/github/languages/top/OPCFoundation/UA-.NETStandard-Samples)](https://github.com/OPCFoundation/UA-.NETStandard-Samples)
[![Github stars](https://img.shields.io/github/stars/OPCFoundation/UA-.NETStandard-Samples?style=flat)](https://github.com/OPCFoundation/UA-.NETStandard-Samples)
[![Github forks](https://img.shields.io/github/forks/OPCFoundation/UA-.NETStandard-Samples?style=flat)](https://github.com/OPCFoundation/UA-.NETStandard-Samples)
[![Github size](https://img.shields.io/github/repo-size/OPCFoundation/UA-.NETStandard-Samples?style=flat)](https://github.com/OPCFoundation/UA-.NETStandard-Samples)
### Build Status
[![Build Status](https://opcfoundation.visualstudio.com/opcua-netstandard/_apis/build/status/OPCFoundation.UA-.NETStandard-Samples?branchName=master)](https://opcfoundation.visualstudio.com/opcua-netstandard/_build/latest?definitionId=12&branchName=master)
## Getting Started
All the tools you need for .Net Standard come with the .Net Core tools. See [here](https://docs.microsoft.com/en-us/dotnet/articles/core/getting-started) for what you need.
## Debugging the Opc.Ua.Core Nuget packages
Since Nuget version 1.4.363.107 there is support for symbol snupkg packages on Nuget.Org and github source link.
- See [devblog](https://devblogs.microsoft.com/nuget/improved-package-debugging-experience-with-the-nuget-org-symbol-server/) for more information on how to setup the debug symbol server.
- Support for [Sourcelink](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink) for integrated source code debugging experience.
<a name="certificates"/>
## Self signed certificates for the sample applications
All required application certificates for OPC UA are created at the first start of each application in a directory or OS-level certificate store and remain in use until deleted from the store.
### Windows .Net applications
By default the self signed certificates are stored in a **X509Store** called **CurrentUser\\UA_MachineDefault**. The certificates can be viewed or deleted with the Windows Certificate Management Console (certmgr.msc). The *trusted*, *issuer* and *rejected* stores remain in a folder called **OPC Foundation\CertificateStores** with a root folder which is specified by the `SpecialFolder` variable **%CommonApplicationData%**. On Windows 7/8/8.1/10 this is usually the invisible folder **C:\ProgramData**.
Note: Since the sample applications in the UA-.Net repository use the same storage and application names as UA-.NetStandard, but create only certificates with hostname `localhost`, it is recommended to delete all existing certificates in **MachineDefault** to recreate proper certificates for all sample applications when moving to the UA-.NetStandard repository.
### Windows UWP applications
By default the self signed certificates are stored in a **X509Store** called **CurrentUser\\UA_MachineDefault**. The certificates can be viewed or deleted with the Windows Certificate Management Console (certmgr.msc).
The *trusted*, *issuer* and *rejected* stores remain in a folder called **OPC Foundation\CertificateStores** in the **LocalState** folder of the installed universal windows package. Deleting the application state also deletes the certificate stores.
### .Net Standard Console applications on Windows, Linux, iOS etc.
The self signed certificates are stored in a folder called **OPC Foundation/CertificateStores/MachineDefault** with a root folder which is specified by the `SpecialFolder` variable **%LocalApplicationData%** or in a **X509Store** called **CurrentUser\\My**, depending on the configuration. For best cross platform support the personal store **CurrentUser\\My** was chosen to support all platforms with the same configuration. Some platforms, like macOS, do not support arbitrary certificate stores.
The *trusted*, *issuer* and *rejected* stores remain in a shared folder called **OPC Foundation\CertificateStores** with a root folder specified by the `SpecialFolder` variable **%LocalApplicationData%**. Depending on the target platform, this folder maps to a hidden locations under the user home directory.
## Local Discovery Server
By default all sample applications are configured to register with a Local Discovery Server (LDS). A reference implementation of a LDS for Windows can be downloaded [here](https://opcfoundation.org/developer-tools/developer-kits-unified-architecture/local-discovery-server-lds). To setup trust with the LDS the certificates need to be exchanged or registration will fail.
## How to build and run the samples in Visual Studio on Windows
1. Open the UA Sample Applications.sln solution file using Visual Studio 2017.
2. Choose a project in the Solution Explorer and set it with a right click as `Startup Project`.
3. Hit `F5` to build and execute the sample.
## How to build and run the console samples on Windows, Linux and iOS
This section describes how to run the **NetCoreConsoleClient** and **NetCoreConsoleServer** sample applications.
Please follow instructions in this [article](https://aka.ms/dotnetcoregs) to setup the dotnet command line environment for your platform. As of today .Net Standard 2.0 is required.
### Prerequisites
1. Once the `dotnet` command is available, navigate to the root folder in your local copy of the repository and execute `dotnet restore UA Sample Applications.sln`. This command calls into NuGet to restore the tree of dependencies.
### Start the server
1. Open a command prompt.
2. Navigate to the folder **Samples/NetCoreConsoleServer**.
3. To run the server sample type `dotnet run --project NetCoreConsoleServer.csproj -a`.
- The server is now running and waiting for connections.
- The `-a` flag allows to auto accept unknown certificates and should only be used to simplify testing.
### Start the client
1. Open a command prompt
2. Navigate to the folder **Samples/NetCoreConsoleClient**.
3. To run the sample type `dotnet run --project NetCoreConsoleClient.csproj -a` to connect to the OPC UA console sample server running on the same host.
- The `-a` flag allows to auto accept unknown certificates and should only be used to simplify testing.
- To connect to another OPC UA server specify the ser
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
# Official OPC UA .Net Standard Samples from the OPC Foundation ## Overview Sample Servers and Clients, including all required controls, for .NET Framework 4.6.2, .NET Core 2.0 and UWP. Integrates the offical OPC UA [NuGet](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/) package containing the OPC UA reference implementation targeting [.NET Standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard). .Net Standard allows you develop apps that run on all common
资源详情
资源评论
资源推荐
收起资源包目录
Official OPC UA .Net Standard Samples from the OPC Foundation (503个子文件)
Package.appxmanifest 2KB
BuildDesign.bat 163B
Opc.Ua.Com.Types.bsd 462B
opcda_i.c 5KB
opchda_i.c 4KB
opc_ae_i.c 4KB
opcbc_i.c 3KB
opccomn_i.c 3KB
OpcCmd_i.c 3KB
OpcDx_i.c 3KB
opcSec_i.c 3KB
OpcEnum_i.c 3KB
App.config 3KB
App.config 3KB
Opc.Ua.SampleClient.exe.config 3KB
Opc.Ua.ComServerWrapper.exe.config 3KB
app.config 1KB
Nuget.Config 258B
COpcXmlAnyType.cpp 44KB
COpcComModule.cpp 34KB
COpcVariant.cpp 32KB
COpcXmlElement.cpp 27KB
COpcUaAeProxyServer.cpp 25KB
OpcXmlType.cpp 23KB
COpcSecurity.cpp 21KB
COpcClassFactory.cpp 20KB
COpcString.cpp 17KB
COpcXmlDocument.cpp 15KB
COpcTextReader.cpp 14KB
COpcUaAeProxySubscription.cpp 11KB
COpcBrowseElement.cpp 9KB
OpcRegistry.cpp 9KB
OpcUtils.cpp 9KB
COpcConnectionPoint.cpp 8KB
OpcCategory.cpp 7KB
COpcCommon.cpp 7KB
COpcUaAeProxyBrowser.cpp 6KB
COpcThreadPool.cpp 5KB
OpcMatch.cpp 5KB
COpcThread.cpp 5KB
COpcFile.cpp 5KB
COpcCPContainer.cpp 5KB
COpcXmlAttribute.cpp 4KB
COpcEnumCPs.cpp 4KB
COpcEnumString.cpp 4KB
COpcEnumUnknown.cpp 4KB
COpcText.cpp 3KB
StdAfx.cpp 1KB
Com.Da.Server.cs 157KB
Com.Da.Group.cs 154KB
ComAeProxy.cs 117KB
ComDaGroup.cs 98KB
ComUtils.cs 92KB
ComHdaProxy.cs 88KB
HistoryDataListView.cs 83KB
ComHdaClient.cs 74KB
ComDaBrowseCache.cs 71KB
ComDaClient.cs 61KB
ComHdaClientNodeManager.cs 59KB
SubscribeRequest.cs 56KB
HistoryDataListView.Designer.cs 55KB
DataAccess.cs 50KB
ClientUtils.cs 49KB
EditComplexValueCtrl.cs 47KB
ComNamespaceMapper.cs 45KB
ComAeSubscription.cs 39KB
HistoricalDataAccess.cs 38KB
ComDaGroupManager.cs 37KB
ComAeSubscription.cs 36KB
ComDaClientNodeManager.cs 35KB
HdaSubscribeRequestManager.cs 34KB
ReadRequest.cs 34KB
ComDaGroup.cs 33KB
SubscribeEventsDlg.cs 32KB
ComAeUtils.cs 32KB
ComHdaItemManager.cs 29KB
ComAeClientNodeManager.cs 29KB
HdaHistoryReadRequest.cs 29KB
AlarmsAndEvents.cs 28KB
ComAeSubscriptionClient.cs 28KB
AeEventFilter.cs 28KB
ComAeCondition.cs 27KB
SubscribeDataListViewCtrl.cs 27KB
EditMonitoredItemDlg.Designer.cs 27KB
ComAeBrowser.cs 26KB
HistoryEventCtrl.Designer.cs 26KB
HdaReadRequest.cs 25KB
ConnectServerCtrl.cs 25KB
GdsDiscoverServersDlg.Designer.cs 25KB
ComAeNamespaceMapper.cs 24KB
ComProxy.cs 24KB
SubscribeEventsDlg.Designer.cs 24KB
Opc.Ua.Com.Classes.cs 23KB
SubscribeDataListViewCtrl.Designer.cs 23KB
ComAeAreaBrowser.cs 23KB
ComDaProxy.cs 23KB
EditWriteValueDlg.Designer.cs 21KB
AeTypeCache.cs 21KB
ClientPage.xaml.cs 20KB
ComDaBrowseManager.cs 20KB
共 503 条
- 1
- 2
- 3
- 4
- 5
- 6
lsfzheng
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0