Skip to content

Commit

Permalink
Add first architecture document.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Feb 9, 2024
1 parent 91c24d9 commit 87b1e55
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 2 deletions.
8 changes: 8 additions & 0 deletions MAKE_RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ Prepare release on dev for new commits.
------------------------------------------------------------
* Make pull request "prepare dev", with the following:
* Update pymodbus/__init__.py with version number (__version__ X.Y.Zpre)


------------------------------------------------------------
Architecture documentation.
------------------------------------------------------------
* install graphviz
* pyreverse -k -o jpg pymodbus

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ Test your changes::
pytest


Architecture
^^^^^^^^^^^^
Internals
^^^^^^^^^

There are no documentation of the architecture (help is welcome), but most classes and
methods are documented:
Expand Down
Binary file modified doc/source/_static/examples.tgz
Binary file not shown.
Binary file modified doc/source/_static/examples.zip
Binary file not shown.
3 changes: 3 additions & 0 deletions doc/source/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ Pymodbus internals
library/framer.rst
library/constants.rst
library/pymodbus.rst

library/architecture/architecture.rst

26 changes: 26 additions & 0 deletions doc/source/library/architecture/architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Architecture =============
The internal structure of pymodbus is a bit complicated, mostly due to the mixture of sync and async.

The overall architecture can be viewed as:

Client classes (interface to applications)
mixin (interface with all requests defined as methods)
transaction (handles transactions and allow concurrent calls)
framers (add pre/post headers to make a valid package)
transport (handles actual transportation)

Server classes (interface to applications)
datastores (handles registers/values to be returned)
transaction (handles transactions and allow concurrent calls)
framers (add pre/post headers to make a valid package)
transport (handles actual transportation)

In detail the packages can viewed as:

.. image:: packages.png


In detail the classes can be viewed as:

.. image:: classes.png

Binary file added doc/source/library/architecture/classes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/library/architecture/packages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 87b1e55

Please sign in to comment.