91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.61MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-30
  • 語言: C#
  • 標(biāo)簽: OPC??UA??C#??示例??

資源簡介

OPC UA C# 示例,使用C#語言 ,OPC UA client,實現(xiàn)與PLC通信,數(shù)據(jù)采集,緊提供開發(fā)示例及思路。

資源截圖

代碼片段和文件信息

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??2018-01-16?11:24??OPC_UA_Client_Core\
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\bin\
?????文件???????90112??2009-07-03?14:39??OPC_UA_Client_Core\bin\Opc.Ua.Client.dll
?????文件?????2589184??2009-07-03?14:39??OPC_UA_Client_Core\bin\Opc.Ua.Core.dll
?????文件???????55296??2010-04-30?11:12??OPC_UA_Client_Core\bin\Siemens.OpcUA.Client.exe
?????文件???????18944??2010-04-30?11:12??OPC_UA_Client_Core\bin\Siemens.OpcUA.dll
?????文件???????22528??2010-04-30?11:12??OPC_UA_Client_Core\bin\Siemens.OpcUA.SimpleClient.exe
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\.vs\
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\.vs\UaClient\
?????目錄???????????0??2018-01-16?11:33??OPC_UA_Client_Core\src\.vs\UaClient\v14\
?????文件???????23552??2018-01-16?11:33??OPC_UA_Client_Core\src\.vs\UaClient\v14\.suo
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\Backup\
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\Backup\ClientAPI\
?????文件???????40444??2010-04-30?11:03??OPC_UA_Client_Core\src\Backup\ClientAPI\ClientAPI.cs
?????文件????????3087??2010-02-16?09:40??OPC_UA_Client_Core\src\Backup\ClientAPI\ClientAPI.csproj
?????文件????????1727??2010-04-30?11:03??OPC_UA_Client_Core\src\Backup\ClientAPI\ClientDiscovery.cs
?????文件????????4351??2010-04-30?11:03??OPC_UA_Client_Core\src\Backup\ClientAPI\ClientSubscription.cs
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\Backup\ClientAPI\Properties\
?????文件?????????841??2010-04-30?10:56??OPC_UA_Client_Core\src\Backup\ClientAPI\Properties\AssemblyInfo.cs
?????文件????????8472??2009-12-14?10:49??OPC_UA_Client_Core\src\Backup\ClientAPI\Properties\Helpers.cs
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\Backup\SimpleClient\
?????文件???????21097??2010-02-28?23:51??OPC_UA_Client_Core\src\Backup\SimpleClient\MainForm.cs
?????文件???????23609??2010-02-28?23:51??OPC_UA_Client_Core\src\Backup\SimpleClient\MainForm.Designer.cs
?????文件????????5814??2010-02-28?23:51??OPC_UA_Client_Core\src\Backup\SimpleClient\MainForm.resx
?????文件?????????521??2010-02-08?15:27??OPC_UA_Client_Core\src\Backup\SimpleClient\Program.cs
?????目錄???????????0??2018-01-16?11:24??OPC_UA_Client_Core\src\Backup\SimpleClient\Properties\
?????文件????????1482??2010-04-30?10:56??OPC_UA_Client_Core\src\Backup\SimpleClient\Properties\AssemblyInfo.cs
?????文件????????2879??2010-02-08?15:27??OPC_UA_Client_Core\src\Backup\SimpleClient\Properties\Resources.Designer.cs
?????文件????????5612??2010-02-08?11:40??OPC_UA_Client_Core\src\Backup\SimpleClient\Properties\Resources.resx
?????文件????????1107??2010-02-08?15:27??OPC_UA_Client_Core\src\Backup\SimpleClient\Properties\Settings.Designer.cs
............此處省略142個文件信息

評論

共有 條評論