資源簡介
西門子OPC UA Client,內(nèi)涵源碼

代碼片段和文件信息
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;
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????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
?????文件??????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
?????文件????????120??2009-08-18?08:48??OPC_UA_CODE_v10\src\ClientAPI\app.config
?????文件??????40444??2010-04-30?11:03??OPC_UA_CODE_v10\src\ClientAPI\ClientAPI.cs
?????文件???????3087??2010-02-16?09:40??OPC_UA_CODE_v10\src\ClientAPI\ClientAPI.csproj
?????文件???????1727??2010-04-30?11:03??OPC_UA_CODE_v10\src\ClientAPI\ClientDiscovery.cs
?????文件???????4351??2010-04-30?11:03??OPC_UA_CODE_v10\src\ClientAPI\ClientSubsc
?????文件????????841??2010-04-30?10:56??OPC_UA_CODE_v10\src\ClientAPI\Properties\AssemblyInfo.cs
?????文件???????8472??2009-12-14?10:49??OPC_UA_CODE_v10\src\ClientAPI\Properties\Helpers.cs
?????文件??????21097??2010-02-28?23:51??OPC_UA_CODE_v10\src\SimpleClient\MainForm.cs
?????文件??????23609??2010-02-28?23:51??OPC_UA_CODE_v10\src\SimpleClient\MainForm.Designer.cs
?????文件???????5814??2010-02-28?23:51??OPC_UA_CODE_v10\src\SimpleClient\MainForm.resx
?????文件????????521??2010-02-08?15:27??OPC_UA_CODE_v10\src\SimpleClient\Program.cs
?????文件???????1482??2010-04-30?10:56??OPC_UA_CODE_v10\src\SimpleClient\Properties\AssemblyInfo.cs
?????文件???????2879??2010-02-08?15:27??OPC_UA_CODE_v10\src\SimpleClient\Properties\Resources.Designer.cs
?????文件???????5612??2010-02-08?11:40??OPC_UA_CODE_v10\src\SimpleClient\Properties\Resources.resx
?????文件???????1107??2010-02-08?15:27??OPC_UA_CODE_v10\src\SimpleClient\Properties\Settings.Designer.cs
?????文件????????249??2010-02-08?11:40??OPC_UA_CODE_v10\src\SimpleClient\Properties\Settings.settings
?????文件???????4540??2010-02-08?15:28??OPC_UA_CODE_v10\src\SimpleClient\SimpleClient.csproj
?????文件??????13692??2010-04-30?11:06??OPC_UA_CODE_v10\src\UAClient\AttributeListControl.cs
?????文件???????3034??2010-02-08?14:59??OPC_UA_CODE_v10\src\UAClient\AttributeListControl.Designer.cs
?????文件???????5814??2010-02-08?14:59??OPC_UA_CODE_v10\src\UAClient\AttributeListControl.resx
?????文件???????8427??2009-11-25?09:30??OPC_UA_CODE_v10\src\UAClient\AttributeListControl_template.cs
?????文件???????6012??2009-11-25?09:30??OPC_UA_CODE_v10\src\UAClient\AttributeListControl_template.resx
?????文件??????15266??2010-02-10?17:17??OPC_UA_CODE_v10\src\UAClient\BrowseControl.cs
............此處省略57個(gè)文件信息
評(píng)論
共有 條評(píng)論