namespace PLCControl { public interface IPLCControl { public string IPAddress { get; set; } public int Port { get; set; } public byte SlaveID { get; set; } public Action ConnectionChanged { get; set; } public bool IsConnected { get; } public bool Connect(); public void Disconnect(); public bool ReadBit(ushort address, byte bitindex); public void WriteBit(ushort address, byte bitindex, bool value); public short ReadInt16(ushort address); public void WriteInt16(ushort address, short value); public void WriteDatas(ushort address, ref T value, byte bytecount) where T : unmanaged; public void ReadDatas(ushort startAddress, ref T value,byte bytecount) where T : unmanaged; } }