Skip to content

Tags: wlcrs/tmodbus

Tags

v0.5.0

Toggle v0.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix PyPI publish flow (#84)

v0.4.1

Toggle v0.4.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add on_connection_lost callback to detect socket drops immediately (#42)

Expose an on_connection_lost callback so consumers can react the moment a
socket drops, rather than waiting for the next request to fail. This mirrors
pymodbus's trace_connect(False), firing straight from the asyncio protocol's
connection_lost.

- Add the callback attribute and a safe-invocation helper on AsyncBaseTransport
  (errors raised by the callback are logged, never break transport teardown).
- Wire it into every base transport's _on_connection_lost (TCP, RTU, ASCII,
  RTU-over-TCP).
- Forward it through AsyncSmartTransport to the base transport. Unlike
  on_reconnected, it works even when auto_reconnect is disabled.
- Thread it through the create_async_* client factory helpers.


Claude-Session: https://claude.ai/code/session_01XUgJ5AXGqf5orSNUXtYigk

Co-authored-by: Claude <[email protected]>

v0.4.0

Toggle v0.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add missing client functions (#41)

* Add missing `read_file_record` and `write_file_record` functions to `AsyncModbusClient`

* Add convenience functions to read/write a single file record

v0.3.2

Toggle v0.3.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix register offset tracking in OrderAwareStruct for sub-register fie…

…lds (#4)

When a register is built from fields smaller than a register (for example
two int8 values packed as ">bbI"), OrderAwareStruct advanced its write
position by the last field's length instead of the accumulated register
length. With word or byte reordering enabled, this spliced the following
multi-register value at the wrong offset, producing corrupted bytes on the
wire. Pack and unpack apply the same transform, so round-trips still
succeeded and hid the issue, but the data sent to a device was wrong.

Advance by the accumulated register length, and add regression tests for
formats that build a register from multiple sub-register tokens.

v0.3.1

Toggle v0.3.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: make serialization lock per connection (#3)

* Fix smart transport lock ownership

* Expand smart transport state regression test

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

v0.3.0

Toggle v0.3.0's commit message
Fix tests

v0.2.3

Toggle v0.2.3's commit message
Do reconnect at most once on _must_reconnect

v0.2.2

Toggle v0.2.2's commit message
Add missing tests for full coverage

v0.2.1

Toggle v0.2.1's commit message
Force reconnect if needed

v0.2.0

Toggle v0.2.0's commit message
Add linting to rst docs