1234567891011121314151617181920 |
- namespace PLCControl
- {
- public interface IPLCControl
- {
- public string IPAddress { get; set; }
- public int Port { get; set; }
- public byte SlaveID { get; set; }
- public Action<bool> 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<T>(ushort address, ref T value, byte bytecount) where T : unmanaged;
- public void ReadDatas<T>(ushort startAddress, ref T value,byte bytecount) where T : unmanaged;
- }
- }
|