Skip to content

Commit 58100ab

Browse files
authored
Add first architecture document. (#1988)
1 parent 91c24d9 commit 58100ab

File tree

8 files changed

+41
-2
lines changed

8 files changed

+41
-2
lines changed

MAKE_RELEASE.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,11 @@ Prepare release on dev for new commits.
5151
------------------------------------------------------------
5252
* Make pull request "prepare dev", with the following:
5353
* Update pymodbus/__init__.py with version number (__version__ X.Y.Zpre)
54+
55+
56+
------------------------------------------------------------
57+
Architecture documentation.
58+
------------------------------------------------------------
59+
* install graphviz
60+
* pyreverse -k -o jpg pymodbus
61+

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ Test your changes::
302302
pytest
303303

304304

305-
Architecture
306-
^^^^^^^^^^^^
305+
Internals
306+
^^^^^^^^^
307307

308308
There are no documentation of the architecture (help is welcome), but most classes and
309309
methods are documented:

doc/source/_static/examples.tgz

-13 Bytes
Binary file not shown.

doc/source/_static/examples.zip

-87 Bytes
Binary file not shown.

doc/source/internals.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ Pymodbus internals
1010
library/framer.rst
1111
library/constants.rst
1212
library/pymodbus.rst
13+
14+
library/architecture/architecture.rst
15+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Architecture
2+
=============
3+
4+
The internal structure of pymodbus is a bit complicated, mostly due to the mixture of sync and async.
5+
6+
The overall architecture can be viewed as:
7+
8+
Client classes (interface to applications)
9+
mixin (interface with all requests defined as methods)
10+
transaction (handles transactions and allow concurrent calls)
11+
framers (add pre/post headers to make a valid package)
12+
transport (handles actual transportation)
13+
14+
Server classes (interface to applications)
15+
datastores (handles registers/values to be returned)
16+
transaction (handles transactions and allow concurrent calls)
17+
framers (add pre/post headers to make a valid package)
18+
transport (handles actual transportation)
19+
20+
In detail the packages can viewed as:
21+
22+
.. image:: packages.png
23+
24+
25+
In detail the classes can be viewed as:
26+
27+
.. image:: classes.png
28+
590 KB
Loading
1.24 MB
Loading

0 commit comments

Comments
 (0)