Skip to content

modbus: add 64-bit byte order support for WS and WR#2736

Merged
fengzeroz merged 1 commit intoemqx:mainfrom
moruoxian:upstream-modbus-wswr
Apr 21, 2026
Merged

modbus: add 64-bit byte order support for WS and WR#2736
fengzeroz merged 1 commit intoemqx:mainfrom
moruoxian:upstream-modbus-wswr

Conversation

@moruoxian
Copy link
Copy Markdown
Contributor

Summary

Add support for WS (34 12 78 56) and WR (56 78 12 34) as additional 64-bit byte orders for Modbus int64, uint64, and double tags.

This change extends address suffix parsing, updates 64-bit endian conversion in the Modbus read/write paths, updates the Modbus TCP/RTU schemas, and adds functional test coverage.

Validation

  • cherry-picked cleanly onto current upstream/main
  • Python functional test file syntax checked successfully
  • local full CMake validation was blocked by missing librdkafka in the current environment, unrelated to this Modbus change

Add support for WS (34 12 78 56) and WR (56 78 12 34) as additional 64-bit byte orders for Modbus int64, uint64, and double tags.

This change extends address suffix parsing, updates 64-bit endian conversion in the Modbus read/write paths, updates the Modbus TCP/RTU schemas, and adds functional test coverage.

Signed-off-by: wangjun <794997265@qq.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 67.01031% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.05%. Comparing base (207da6d) to head (c99999b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
plugins/modbus/modbus_req.c 42.85% 20 Missing ⚠️
src/adapter/driver/driver.c 50.00% 12 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2736   +/-   ##
=======================================
  Coverage   65.04%   65.05%           
=======================================
  Files         129      129           
  Lines       31290    31387   +97     
=======================================
+ Hits        20353    20419   +66     
- Misses      10937    10968   +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@moruoxian moruoxian force-pushed the upstream-modbus-wswr branch from f22ccec to c99999b Compare April 16, 2026 06:00
@moruoxian moruoxian requested a review from fengzeroz April 16, 2026 06:23
@fengzeroz fengzeroz merged commit 6e243ab into emqx:main Apr 21, 2026
37 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants