mirror of
https://github.com/evopro-ag/Sharp7Reactive.git
synced 2025-12-16 11:42:52 +00:00
imported Sharp7.Rx
This commit is contained in:
13
Sharp7.Rx/Interfaces/IPlc.cs
Normal file
13
Sharp7.Rx/Interfaces/IPlc.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Sharp7.Rx.Enums;
|
||||
|
||||
namespace Sharp7.Rx.Interfaces
|
||||
{
|
||||
public interface IPlc : IDisposable
|
||||
{
|
||||
IObservable<TValue> CreateNotification<TValue>(string variableName, TransmissionMode transmissionMode, TimeSpan cycleSpan);
|
||||
Task SetValue<TValue>(string variableName, TValue value);
|
||||
Task<TValue> GetValue<TValue>(string variableName);
|
||||
}
|
||||
}
|
||||
22
Sharp7.Rx/Interfaces/IS7Connector.cs
Normal file
22
Sharp7.Rx/Interfaces/IS7Connector.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Sharp7.Rx.Enums;
|
||||
|
||||
namespace Sharp7.Rx.Interfaces
|
||||
{
|
||||
internal interface IS7Connector : IDisposable
|
||||
{
|
||||
IObservable<ConnectionState> ConnectionState { get; }
|
||||
Task InitializeAsync();
|
||||
|
||||
Task<bool> Connect();
|
||||
Task Disconnect();
|
||||
|
||||
Task<bool> ReadBit(Operand operand, ushort byteAddress, byte bitAdress, ushort dbNr, CancellationToken token);
|
||||
Task<byte[]> ReadBytes(Operand operand, ushort startByteAddress, ushort bytesToRead, ushort dBNr, CancellationToken token);
|
||||
|
||||
Task<bool> WriteBit(Operand operand, ushort startByteAddress, byte bitAdress, bool value, ushort dbNr, CancellationToken token);
|
||||
Task<ushort> WriteBytes(Operand operand, ushort startByteAdress, byte[] data, ushort dBNr, CancellationToken token);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user