Skip to content

Conversation

@janiversen
Copy link
Collaborator

@janiversen janiversen commented Apr 13, 2023

Internally both client and server uses async transport, in order to optimise code maintenance.

The transport layer is responsible for handing:

  • connect/disconnect
  • receive data, with frame handling
  • send data, with automatic retry (if configured)
  • automatic reconnect (if configured)
  • Diagnostic (if configured)

The transport layer is solely internal to pymodbus and do not expose any API to the outside world. States like e.g. connected, are NOT exposed directly. but must be added in the different interfaces.

Note: the transport layer is independent of the actual transport method tcp/udp/tls/serial.

This is the first version, it contains a lot of simplifications:

  • clients no longer have different connection_made and connection_lost co-routines.
  • transport is integrated in client base.

@janiversen janiversen marked this pull request as draft April 13, 2023 20:31
@janiversen janiversen force-pushed the new_transport branch 4 times, most recently from 8afa208 to 9bb1f50 Compare April 19, 2023 18:34
@janiversen janiversen marked this pull request as ready for review April 20, 2023 15:45
@janiversen janiversen merged commit 7a4c609 into dev Apr 20, 2023
@janiversen janiversen deleted the new_transport branch April 20, 2023 15:55
@alexrudd2
Copy link
Collaborator

This introduced a tiny type error (#1511), which was easy enough to solve.

@janiversen
Copy link
Collaborator Author

Thanks, and sorry for that.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants