| | |
| | | import com.modbus.data.MyModbusUtils; |
| | | import com.serotonin.modbus4j.BatchRead; |
| | | import com.serotonin.modbus4j.BatchResults; |
| | | import com.serotonin.modbus4j.code.DataType; |
| | | |
| | | public class Water_state implements Serializable{ |
| | | public int num;//'主键', |
| | |
| | | */ |
| | | public BatchRead<Integer> createBatchRead(MyModbusMaster master){ |
| | | BatchRead<Integer> batch = new BatchRead<Integer>(); |
| | | batch.addLocator(0,MyModbusUtils.createBaseLocator(Watersystem_ModbusAddress.Watersystem_All_Operation ,master));//水冷系统各部件运行情况 |
| | | batch.addLocator(1,MyModbusUtils.createBaseLocator(Watersystem_ModbusAddress.Watersystem_All_State ,master));//故障复位信号 |
| | | batch.addLocator(0,MyModbusUtils.createBaseLocator(Watersystem_ModbusAddress.Watersystem_All_Operation ,DataType.TWO_BYTE_INT_SIGNED,master));//水冷系统各部件运行情况 |
| | | batch.addLocator(1,MyModbusUtils.createBaseLocator(Watersystem_ModbusAddress.Watersystem_All_State ,DataType.TWO_BYTE_INT_SIGNED,master));//故障复位信号 |
| | | return batch; |
| | | } |
| | | /** |