Skip to content

Commit 73e9a57

Browse files
authored
Merge pull request #246 from riptideio/async
Redesign Async client implementation with support to tornado and asyncio
2 parents 7f788a4 + b8faf33 commit 73e9a57

File tree

93 files changed

+4575
-603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4575
-603
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ pymodbus/server/__pycache__/
2222
test/__pycache__/
2323
**/pymodbus.db
2424
/.eggs/
25+
/test/bin/
26+
/test/include/
27+
/test/lib/
28+
/test/pip-selfcheck.json
29+
/test/.Python
2530
/.cache/
2631
/doc/sphinx/doctrees/
2732
/doc_new/

.readthedocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ python:
77
extra_requirements:
88
- twisted
99
- documents
10+
version: 3.5

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ matrix:
1111
- os: linux
1212
python: "3.6"
1313
- os: osx
14+
osx_image: xcode8.3
1415
language: generic
1516
before_install:
1617
- if [ $TRAVIS_OS_NAME = osx ]; then brew update; fi
1718
- if [ $TRAVIS_OS_NAME = osx ]; then brew install openssl; fi
1819

1920
install:
2021
# - scripts/travis.sh pip install pip-accel
22+
- scripts/travis.sh pip install -U setuptools
2123
- scripts/travis.sh pip install coveralls
2224
- scripts/travis.sh pip install --requirement=requirements-checks.txt
2325
- scripts/travis.sh pip install --requirement=requirements-tests.txt

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 2.0.0rc1
2+
-----------------------------------------------------------
3+
**Note This is a Major release and might affect your existing Async client implementation. Refer examples on how to use the latest async clients.**
4+
5+
* Async client implementation based on Tornado, Twisted and asyncio
6+
17
Version 1.5.1
28
------------------------------------------------------------
39
* Fix device information selectors
@@ -36,6 +42,7 @@ Version 1.5.0
3642
* Modbus read retries works only when empty/no message is received
3743
* Change test runner from nosetest to pytest
3844
* Fix Misc examples
45+
>>>>>>> master
3946

4047
Version 1.4.0
4148
------------------------------------------------------------

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include requirements.txt
2+
include README.rst
3+
include CHANGELOG.rst

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ check: install
3939

4040
test: install
4141
@pip install --quiet --requirement=requirements-tests.txt
42-
@py.test
42+
@py.test --cov=pymodbus/ --cov-report term-missing
4343
@coverage report --fail-under=90
4444

4545
tox: install

README.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
.. image:: https://badges.gitter.im/Join%20Chat.svg
55
:target: https://gitter.im/pymodbus_dev/Lobby
66

7-
.. image:: https://readthedocs.org/projects/pymodbus-n/badge/?version=latest
8-
:target: http://pymodbus-n.readthedocs.io/en/latest/?badge=latest
7+
.. image:: https://readthedocs.org/projects/pymodbus/badge/?version=latest
8+
:target: http://pymodbus.readthedocs.io/en/async/?badge=latest
99
:alt: Documentation Status
1010

11+
.. important::
12+
**Note This is a Major release and might affect your existing Async client implementation. Refer examples on how to use the latest async clients.**
13+
1114
============================================================
1215
Summary
1316
============================================================
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
==================================================
2-
Asynchronous Client Example
2+
Async Asyncio Client Example
33
==================================================
4-
.. literalinclude:: ../../../examples/common/asynchronous_client.py
4+
.. literalinclude:: ../../../examples/common/async_asyncio_client.py
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
==================================================
2+
Async Asyncio Serial Client Example
3+
==================================================
4+
.. literalinclude:: ../../../examples/common/async_asyncio_serial_client.py
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
==================================================
2+
Async Tornado Client Example
3+
==================================================
4+
.. literalinclude:: ../../../examples/common/async_tornado_client.py
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
==================================================
2+
Async Tornado Client Serial Example
3+
==================================================
4+
.. literalinclude:: ../../../examples/common/async_tornado_client_serial.py
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
==================================================
2+
Async Twisted Client Example
3+
==================================================
4+
.. literalinclude:: ../../../examples/common/async_twisted_client.py
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
==================================================
2+
Async Twisted Client Serial Example
3+
==================================================
4+
.. literalinclude:: ../../../examples/common/async_twisted_client_serial.py
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
==================================================
2+
Asynchronous Asyncio Serial Client Example
3+
==================================================
4+
.. literalinclude:: ../../../examples/contrib/asynchronous_asyncio_serial_client.py
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
==================================================
1+
===========================
22
Asynchronous Server Example
3-
==================================================
4-
.. literalinclude:: ../../../examples/common/asynchronous_server.py
3+
===========================
4+
.. literalinclude:: ../../../examples/common/asynchronous_server.py
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
==================================================
1+
===========================
22
Callback Server Example
3-
==================================================
3+
===========================
44
.. literalinclude:: ../../../examples/common/callback_server.py

doc/source/example/modules.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ Examples
66
.. toctree::
77
:maxdepth: 4
88

9-
asynchronous_client
9+
async_asyncio_client
10+
async_asyncio_serial_client
11+
async_tornado_client
12+
async_tornado_client_serial
13+
async_twisted_client
14+
async_twisted_client_serial
1015
asynchronous_processor
1116
asynchronous_server
1217
callback_server
@@ -22,6 +27,7 @@ Examples
2227
synchronous_client_ext
2328
synchronous_server
2429
updating_server
30+
asynchronous_asyncio_serial_client
2531
bcd_payload
2632
concurrent_client
2733
libmodbus_client

doc/source/example/performance.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
performance module
33
==================
44
.. literalinclude:: ../../../examples/common/performance.py
5+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pymodbus\.client\.async\.asyncio package
2+
========================================
3+
4+
.. automodule:: pymodbus.client.async.asyncio
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
pymodbus\.client\.async\.factory package
2+
========================================
3+
4+
.. automodule:: pymodbus.client.async.factory
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
Submodules
10+
----------
11+
12+
pymodbus\.client\.async\.factory\.serial module
13+
-----------------------------------------------
14+
15+
.. automodule:: pymodbus.client.async.factory.serial
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
20+
pymodbus\.client\.async\.factory\.tcp module
21+
--------------------------------------------
22+
23+
.. automodule:: pymodbus.client.async.factory.tcp
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:
27+
28+
pymodbus\.client\.async\.factory\.udp module
29+
--------------------------------------------
30+
31+
.. automodule:: pymodbus.client.async.factory.udp
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:
35+
36+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
pymodbus\.client\.async package
2+
===============================
3+
4+
.. automodule:: pymodbus.client.async
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
Subpackages
10+
-----------
11+
12+
.. toctree::
13+
14+
pymodbus.client.async.asyncio
15+
pymodbus.client.async.factory
16+
pymodbus.client.async.schedulers
17+
pymodbus.client.async.tornado
18+
pymodbus.client.async.twisted
19+
20+
Submodules
21+
----------
22+
23+
pymodbus\.client\.async\.serial module
24+
--------------------------------------
25+
26+
.. automodule:: pymodbus.client.async.serial
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
pymodbus\.client\.async\.tcp module
32+
-----------------------------------
33+
34+
.. automodule:: pymodbus.client.async.tcp
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
pymodbus\.client\.async\.thread module
40+
--------------------------------------
41+
42+
.. automodule:: pymodbus.client.async.thread
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
pymodbus\.client\.async\.udp module
48+
-----------------------------------
49+
50+
.. automodule:: pymodbus.client.async.udp
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pymodbus\.client\.async\.schedulers package
2+
===========================================
3+
4+
.. automodule:: pymodbus.client.async.schedulers
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pymodbus\.client\.async\.tornado package
2+
========================================
3+
4+
.. automodule:: pymodbus.client.async.tornado
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pymodbus\.client\.async\.twisted package
2+
========================================
3+
4+
.. automodule:: pymodbus.client.async.twisted
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
pymodbus\.client package
22
========================
33

4-
Submodules
5-
----------
6-
7-
pymodbus\.client\.async module
8-
------------------------------
9-
10-
.. automodule:: pymodbus.client.async
4+
.. automodule:: pymodbus.client
115
:members:
126
:undoc-members:
137
:show-inheritance:
148

9+
Subpackages
10+
-----------
11+
12+
.. toctree::
13+
14+
pymodbus.client.async
15+
16+
Submodules
17+
----------
18+
1519
pymodbus\.client\.common module
1620
-------------------------------
1721

@@ -29,10 +33,3 @@ pymodbus\.client\.sync module
2933
:show-inheritance:
3034

3135

32-
Module contents
33-
---------------
34-
35-
.. automodule:: pymodbus.client
36-
:members:
37-
:undoc-members:
38-
:show-inheritance:

doc/source/library/pymodbus.datastore.database.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
pymodbus\.datastore\.database package
22
=====================================
33

4+
.. automodule:: pymodbus.datastore.database
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
49
Submodules
510
----------
611

@@ -21,10 +26,3 @@ pymodbus\.datastore\.database\.sql\_datastore module
2126
:show-inheritance:
2227

2328

24-
Module contents
25-
---------------
26-
27-
.. automodule:: pymodbus.datastore.database
28-
:members:
29-
:undoc-members:
30-
:show-inheritance:

doc/source/library/pymodbus.datastore.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
pymodbus\.datastore package
22
===========================
33

4+
.. automodule:: pymodbus.datastore
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
49
Subpackages
510
-----------
611

@@ -36,10 +41,3 @@ pymodbus\.datastore\.store module
3641
:show-inheritance:
3742

3843

39-
Module contents
40-
---------------
41-
42-
.. automodule:: pymodbus.datastore
43-
:members:
44-
:undoc-members:
45-
:show-inheritance:

0 commit comments

Comments
 (0)