package com.mes.connect.IndustrialInterface; import java.io.IOException; /** * 工业通信统一接口 - 客户端模式 */ public interface IndustrialClient extends AutoCloseable { void connect() throws IOException; void disconnect(); boolean isConnected(); // 数据读写方法 boolean readBit(String address) throws IOException; void writeBit(String address, boolean value) throws IOException; int readRegister(String address) throws IOException; void writeRegister(String address, int value) throws IOException; int[] readRegisters(String address, int quantity) throws IOException; void writeRegisters(String address, int[] values) throws IOException; float readFloat(String address) throws IOException; void writeFloat(String address, float value) throws IOException; String readString(String address, int length) throws IOException; void writeString(String address, String value) throws IOException; @Override void close() throws IOException; }