kochedykov / jlibmodbus

JLibModbus - is an implementation of the Modbus protocol v1.1b in java language. Java modbus library. It works. Welcome.
http://kochedykov.github.io/jlibmodbus/
Apache License 2.0
299 stars 128 forks source link

com.intelligt.modbus.jlibmodbus.msg.response.BroadcastResponse cannot be cast to com.intelligt.modbus.jlibmodbus.msg.response.ReadHoldingRegistersResponse #74

Open shaisxx opened 2 years ago

shaisxx commented 2 years ago

com.intelligt.modbus.jlibmodbus.msg.response.BroadcastResponse cannot be cast to com.intelligt.modbus.jlibmodbus.msg.response.ReadHoldingRegistersResponse

yudaichen commented 2 years ago

java.lang.ClassCastException: com.intelligt.modbus.jlibmodbus.msg.response.BroadcastResponse cannot be cast to com.intelligt.modbus.jlibmodbus.msg.response.ReadInputRegistersResponse

yudaichen commented 2 years ago

Cannot be a broadcast address.

 request.getServerAddress() != Modbus.BROADCAST_ID 
ServerAddress != 0x00. It took me a whole day. I once thought it was the problem of spring-boot-devtools.

Hotant-Bu commented 1 year ago

cannot be cast to com.intelligt.modbus.jlibmodbus.msg.response.ReadHoldingRegistersResponse