using ProtocalGeneral; namespace ModBusTcp; public interface IModBus { bool Initialize(string name, ITcpConnectNority tcpConnect); T_buffer GetBuffer(ushort index, ushort count, byte slaveAddress = 1); bool SetUshort(ushort index, ushort value, byte slaveAddress = 1); bool SetValue(ushort index, T value, byte slaveAddress = 1) where T : struct; bool SetFloat(ushort index, float value, byte slaveAddress = 1); bool Open(string ip, ushort port, bool notify = true); bool Close(); }