Skip to content

Add an offline Modbus RTU and ASCII frame generator - #3111

Merged
janiversen merged 1 commit into
pymodbus-dev:devfrom
cthings-co:mainstream_our_changes
Dec 2, 2026
Merged

janiversen merged 1 commit into
pymodbus-dev:devfrom
cthings-co:mainstream_our_changes

Conversation

@Szewcson

@Szewcson Szewcson commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

ModbusFrameGenerator builds serial requests and decodes captured replies without opening a port. It reuses the client request methods and RTU/ASCII framers, accepts responses from any device address, and leaves caller-owned request PDUs unchanged.

Includes a runnable example and tests for both frame formats, custom delimiters, normal and exception replies, and malformed frames.

@janiversen janiversen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@janiversen

Copy link
Copy Markdown
Collaborator

Thanks for sharing this with the pymodbus user base.

@janiversen
janiversen merged commit 080cf3a into pymodbus-dev:dev Dec 2, 2026
16 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.

2 participants