27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using Aurora.Api;
|
|
|
|
namespace AuroraDeviceCommon
|
|
{
|
|
public interface IModbus
|
|
{
|
|
int Connect(IDeviceConfig config);
|
|
int Disconnect();
|
|
int WriteBit(ushort address, bool bit);
|
|
int WriteWord(ushort address, short value);
|
|
int WriteDoubleWord(ushort address, int value);
|
|
int WriteReal(ushort address, float word);
|
|
int WriteBitBlock(ushort address, bool[] bits);
|
|
int WriteWordBlock(ushort address, short[] words);
|
|
(int err, bool value) ReadBit(ushort address);
|
|
(int err, bool value) ReadInputBit(ushort address);
|
|
(int err, short value) ReadWord(ushort address);
|
|
(int err, short value) ReadInputWord(ushort address);
|
|
(int err, int value) ReadDoubleWord(ushort address);
|
|
(int err, float value) ReadReal(ushort address);
|
|
(int err, bool[] bits) ReadBitBlock(ushort address, int count);
|
|
(int err, bool[] bits) ReadInputBitBlock(ushort address, int count);
|
|
(int err, short[] words) ReadWordBlock(ushort address, int count);
|
|
(int err, short[] words) ReadInputWordBlock(ushort address, int count);
|
|
}
|
|
}
|