资源简介
C# OPC UA 客户端,亲测可以使用。这个是西门子的客户端,对其他也可以使用,对OPC UA 敢兴趣的可以参考下。

代码片段和文件信息
using System;
using System.Collections;
using System.Security.Cryptography.X509Certificates;
using Opc.Ua;
using Opc.Ua.Client;
using Siemens.OpcUA.Helper;
namespace Siemens.OpcUA
{
///
/// Event handler for the event that the client received a value change.
///
public delegate void valueChanged(object clientHandle DataValue value);
///
/// Event handler for the event that the client received a untrusted server certificate.
///
public delegate void certificateValidation(CertificateValidator validator CertificateValidationEventArgs e);
///
/// This class encapsulates a connection to an OPC UA server and access to particular Services of it.
///
public class Server
{
#region Construction
public Server()
{ }
#endregion
#region Fields
///
/// Keeps a session with an UA server.
///
private Session m_Session = null;
///
/// Interface which encapsulates the use of the browse service of an UA server.
///
private Browser m_Browser = null;
///
/// Keeps a hash table for attribute names.
///
private Hashtable m_hashAttributeNames = null;
#endregion
#region Properties
///
/// Use the certificateValidation delegate as event.
///
public event certificateValidation CertificateEvent = null;
///
/// Provides the session being established with an OPC UA server.
///
public Session Session
{
get { return m_Session; }
}
#endregion
#region Connect
/// Establishes the connection to an OPC UA server.
/// The Url of the endpoint.
/// Result code.
/// Throws and forwards any exception with short error description.
public void Connect(string Url)
{
try
{
// Create the configuration.
ApplicationConfiguration configuration = Helpers.CreateClientConfiguration();
// Create the endpoint description.
EndpointDescription endpointDescription = Helpers.CreateEndpointDescription(Url);
// Create the endpoint configuration (use the application configuration to provide default values).
EndpointConfiguration endpointConfiguration = EndpointConfiguration.Create(configuration);
// The default timeout for a requests sent using the channel.
endpointConfiguration.OperationTimeout = 300000;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-02-28 23:43 OPC_UA_CODE_v10\
目录 0 2010-02-28 23:49 OPC_UA_CODE_v10\bin\
文件 90112 2009-07-03 14:39 OPC_UA_CODE_v10\bin\Opc.Ua.Client.dll
文件 2589184 2009-07-03 14:39 OPC_UA_CODE_v10\bin\Opc.Ua.Core.dll
文件 55296 2010-04-30 11:12 OPC_UA_CODE_v10\bin\Siemens.OpcUA.Client.exe
文件 18944 2010-04-30 11:12 OPC_UA_CODE_v10\bin\Siemens.OpcUA.dll
文件 22528 2010-04-30 11:12 OPC_UA_CODE_v10\bin\Siemens.OpcUA.SimpleClient.exe
目录 0 2018-11-01 22:40 OPC_UA_CODE_v10\src\
目录 0 2018-11-01 22:32 OPC_UA_CODE_v10\src\.vs\
目录 0 2018-11-01 22:32 OPC_UA_CODE_v10\src\.vs\UaClient\
目录 0 2018-11-01 22:33 OPC_UA_CODE_v10\src\.vs\UaClient\v15\
文件 72192 2018-11-02 09:46 OPC_UA_CODE_v10\src\.vs\UaClient\v15\.suo
目录 0 2018-11-01 22:32 OPC_UA_CODE_v10\src\.vs\UaClient\v15\Server\
目录 0 2018-11-01 22:32 OPC_UA_CODE_v10\src\.vs\UaClient\v15\Server\sqlite3\
文件 0 2018-11-01 22:32 OPC_UA_CODE_v10\src\.vs\UaClient\v15\Server\sqlite3\db.lock
文件 4096 2018-11-01 22:32 OPC_UA_CODE_v10\src\.vs\UaClient\v15\Server\sqlite3\storage.ide
文件 32768 2018-11-02 09:02 OPC_UA_CODE_v10\src\.vs\UaClient\v15\Server\sqlite3\storage.ide-shm
文件 1474992 2018-11-02 09:02 OPC_UA_CODE_v10\src\.vs\UaClient\v15\Server\sqlite3\storage.ide-wal
目录 0 2010-02-28 23:46 OPC_UA_CODE_v10\src\bin\
文件 90112 2009-07-03 14:39 OPC_UA_CODE_v10\src\bin\Opc.Ua.Client.dll
文件 2589184 2009-07-03 14:39 OPC_UA_CODE_v10\src\bin\Opc.Ua.Core.dll
目录 0 2018-11-01 22:36 OPC_UA_CODE_v10\src\ClientAPI\
文件 120 2009-08-18 08:48 OPC_UA_CODE_v10\src\ClientAPI\app.config
目录 0 2018-11-01 22:32 OPC_UA_CODE_v10\src\ClientAPI\bin\
目录 0 2018-11-02 09:02 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\
文件 90112 2009-07-03 14:39 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\Opc.Ua.Client.dll
文件 2589184 2009-07-03 14:39 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\Opc.Ua.Core.dll
文件 19968 2018-11-02 09:02 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\Siemens.OpcUA.dll
文件 36352 2018-11-02 09:02 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\Siemens.OpcUA.pdb
文件 446464 2018-08-02 09:05 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\System.IdentityModel.dll
文件 126976 2018-09-20 09:08 OPC_UA_CODE_v10\src\ClientAPI\bin\Debug\System.IdentityModel.Selectors.dll
............此处省略138个文件信息
相关资源
- Visual C#.2010从入门到精通配套源程序
- 连连看游戏C#源码有提示和洗牌功能
- opc ua客户端171716
- 基于C#开发OPC客户端
- c# opc开发
- OPCUA:C#使用OpcUaHelper开源库开发客M
- Quartz.NET定时任务框架
- Microsoft® Visual C#® 2010 Step by
- RSlinux Opc Client
- CSharp language specification 5.0中文(C# 语
- C#访问OPC(附代码讲解)
- visual C#使用指纹识别器实现员工考勤
- lua C# .Net4.0 vs2010 LuaInterface
- visual C#2005 管理系统开发经典案例 罗
- Visual Studio C#播放器制作
-
Visual.Studio.NET.fr
amework技术内幕(高 - Web实训网站C#新闻发布系统
- OPC UA Server .Net源码,SDK
- Visual C#从入门到精通(第9版)-2018年
- C# quartz 定时使用教程
- ToLua集成Protobuffer3
- Visual C# 2010程序设计教程(教程PPT+源
- C#库存管理系统visual studio2005
- Visual+Studio+2005制作学生成绩管理系统
- Visual C#数据库项目案例导航(代码)
- 学生信息管理系统(本系统的开发环
- 杨晓光《Visual C#.NET程序设计》源代码
- Visual C#数据库项目案例导航
- Visual C#.NET 应用编程150例
- Visual C#+SQL Server数据库开发与源代码
评论
共有 条评论