2017-03-06 Update 1 Opc Update (Not test)
This commit is contained in:
42
Modbus.Net/Modbus.Net.OPC/ClientExtend.cs
Normal file
42
Modbus.Net/Modbus.Net.OPC/ClientExtend.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Hylasoft.Opc.Common;
|
||||
using Hylasoft.Opc.Da;
|
||||
using Opc;
|
||||
using Opc.Da;
|
||||
using System.Collections.Generic;
|
||||
using Hylasoft.Opc.Ua;
|
||||
|
||||
namespace Modbus.Net.OPC
|
||||
{
|
||||
public interface IClientExtend : IDisposable
|
||||
{
|
||||
void Connect();
|
||||
|
||||
T Read<T>(string tag);
|
||||
|
||||
void Write<T>(string tag, T item);
|
||||
|
||||
Task<T> ReadAsync<T>(string tag);
|
||||
|
||||
Task WriteAsync<T>(string tag, T item);
|
||||
|
||||
Task<Node> FindNodeAsync(string tag);
|
||||
|
||||
Task<IEnumerable<Node>> ExploreFolderAsync(string tag);
|
||||
}
|
||||
|
||||
public class MyDaClient : DaClient, IClientExtend
|
||||
{
|
||||
public MyDaClient(Uri serverUrl) : base(serverUrl)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class MyUaClient : UaClient, IClientExtend
|
||||
{
|
||||
public MyUaClient(Uri serverUrl) : base(serverUrl)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user