MangoAutomation / modbus4j

A high-performance and ease-of-use implementation of the Modbus protocol written in Java. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning and response data type parsing.
GNU General Public License v3.0
897 stars 370 forks source link

大小端问题 #65

Closed kay07 closed 1 year ago

kay07 commented 1 year ago

代码中使用DataType来进行数据类型与大小端的控制,如DataType.FOUR_BYTE_FLOAT表示浮点数大端,而另外一个DataType.FOUR_BYTE_FLOAT_SWAPPED本来期望得到的是小端,这个真实的其实是小端翻转。剩余的两种大端翻转和小端,其实是不支持的。

kay07 commented 1 year ago

期望能够支持大端和小端,要不然得自己做大小端转化了。

kay07 commented 1 year ago

更新到自己仓库了,https://github.com/kay07/modbus