Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
fbbf69e
Rebase to dev3.7
dices Sep 28, 2018
b8c968c
Adding 3.7 to travis configuration
dices Sep 22, 2018
38f1dc1
Updated documentation to resolve warnings introduced with the longer …
dices Sep 23, 2018
e40c78d
Fixed reference to deprecated asynchronous
dices Sep 28, 2018
44668d9
Merge pull request #2 from dices/Py37
dices Sep 28, 2018
e0829bd
Adding gmp disable to fix pypy build issues
dices Sep 28, 2018
06627b8
Adding gmp disable to fix pypy build issues
dices Sep 28, 2018
e11bff7
Removing travis python 3.7 configuration
dices Oct 2, 2018
0fce5b5
Adding asserts for Payload Endianness
EricDuminil Oct 8, 2018
3838f5f
Fixing example of Payload. Same Endianness for builder and decoder.
EricDuminil Oct 8, 2018
826a76c
Merge pull request #350 from EricDuminil/master
dhoomakethu Oct 9, 2018
13adf0a
Fix Sql db slave context validate and get methods - #139
dhoomakethu Oct 9, 2018
cd1cb1c
Merge branch 'dev3.7' of https://github.com/riptideio/pymodbus into d…
dices Oct 10, 2018
05afbb0
Merge pull request #351 from riptideio/#139-SqlDb-Context
dhoomakethu Oct 15, 2018
d00a8cd
#353 - debugging, Add debug logs to check size of avaialble data in r…
dhoomakethu Oct 16, 2018
e85057a
#353 Provide an option to disable inter char timeouts
dhoomakethu Oct 17, 2018
c0a2359
#353 Bump version, update changelog
dhoomakethu Oct 18, 2018
aef3e0a
Merge pull request #355 from riptideio/#353-Error-Reading-Registers
dhoomakethu Oct 23, 2018
e09fed7
Merge pull request #346 from dices/dev3.7
dhoomakethu Oct 23, 2018
b3281fe
Merge pull request #362 from riptideio/dev3.7
dhoomakethu Jan 12, 2019
7e1c728
check self.socket (#354)
mpf82 Jan 14, 2019
d14318f
Fix typo (#378)
kimhanse Jan 26, 2019
9ff42d1
Pymodbus 2.2.0 (#375)
dhoomakethu Apr 18, 2019
9dcdca8
Fix docs (#407)
dhoomakethu Apr 19, 2019
c42d619
Merge branch 'master' into dev
dhoomakethu Apr 19, 2019
14af637
Remove pycrypto dep (#411)
tracernz Apr 22, 2019
13384e4
Fix --upgrade option in install dependencies (#413)
acanidio May 13, 2019
92b4428
Padding for odd sized responses (#425)
tcplomp Jul 25, 2019
ca74132
README update: REPL stands for Read Evaluate **Print** Loop (#426)
alecjohanson Jul 30, 2019
6a6ebde
Drop python 3.4 support (#440)
tracernz Sep 9, 2019
b6429fc
Re-enable travis python 3.7 builds (#441)
tracernz Sep 9, 2019
68932a3
Update __init__.py (#436)
hackerboygn Sep 9, 2019
c645605
Use SPDX identifier to specify the exact license type (#427)
yegorich Sep 9, 2019
e6da559
asyncio server implementation (#400)
memetb Sep 9, 2019
050b03c
Add option to repl allowing Modbus RTU framing on a TCP socket (#447)
Sekenre Sep 26, 2019
cc6e976
Fix asynci server test failures on python3.6 and below
Oct 7, 2019
507e8a0
Bump version to 2.2.0rc1, update six requirements and Changelog
Oct 7, 2019
fedea33
Support multiple Python versions to fix test error from PR #400 (#444)
starnight Oct 17, 2019
4bdf738
Add TLS feature for Modbus synchronous (#446)
starnight Oct 28, 2019
3fb83cc
Fix #461 - Udp client/server , Fix #401 - package license with source…
dhoomakethu Oct 29, 2019
b97659d
Fix examples, Merge #431
dhoomakethu Oct 29, 2019
632d300
#401 Move license to root folder from docs
dhoomakethu Oct 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated documentation to resolve warnings introduced with the longer …
…names

Updated requirements-docs.txt to include missing modules
  • Loading branch information
dices committed Sep 28, 2018
commit 38f1dc1c017375091ed64be837431efa37ca9d2d
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ Version 1.5.1
* Added REPR statements for all syncchronous clients
* Added `isError` method to exceptions, Any response received can be tested for success before proceeding.

```
"""

res = client.read_holding_registers(...)
if not res.isError():

# proceed

else:
# handle error or raise
```

"""

* Add examples for MEI read device information request

Version 1.5.0
Expand Down
5 changes: 3 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc']
extensions = ['sphinx.ext.autodoc', 'm2r']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -104,7 +104,8 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
4 changes: 2 additions & 2 deletions doc/source/library/pymodbus.client.asynchronous.asyncio.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pymodbus\.client\.async\.asyncio package
========================================
pymodbus\.client\.asynchronous\.asyncio package
===============================================

.. automodule:: pymodbus.client.asynchronous.asyncio
:members:
Expand Down
16 changes: 8 additions & 8 deletions doc/source/library/pymodbus.client.asynchronous.factory.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pymodbus\.client\.async\.factory package
========================================
pymodbus\.client\.asynchronous\.factory package
===============================================

.. automodule:: pymodbus.client.asynchronous.factory
:members:
Expand All @@ -9,24 +9,24 @@ pymodbus\.client\.async\.factory package
Submodules
----------

pymodbus\.client\.async\.factory\.serial module
-----------------------------------------------
pymodbus\.client\.asynchronous\.factory\.serial module
------------------------------------------------------

.. automodule:: pymodbus.client.asynchronous.factory.serial
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.factory\.tcp module
--------------------------------------------
pymodbus\.client\.asynchronous\.factory\.tcp module
---------------------------------------------------

.. automodule:: pymodbus.client.asynchronous.factory.tcp
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.factory\.udp module
--------------------------------------------
pymodbus\.client\.asynchronous\.factory\.udp module
---------------------------------------------------

.. automodule:: pymodbus.client.asynchronous.factory.udp
:members:
Expand Down
18 changes: 9 additions & 9 deletions doc/source/library/pymodbus.client.asynchronous.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pymodbus\.client\.asynchronous package
===============================
======================================

.. automodule:: pymodbus.client.asynchronous
:members:
Expand All @@ -20,32 +20,32 @@ Subpackages
Submodules
----------

pymodbus\.client\.async\.serial module
--------------------------------------
pymodbus\.client\.asynchronous\.serial module
---------------------------------------------

.. automodule:: pymodbus.client.asynchronous.serial
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.tcp module
-----------------------------------
pymodbus\.client\.asynchronous\.tcp module
------------------------------------------

.. automodule:: pymodbus.client.asynchronous.tcp
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.thread module
--------------------------------------
pymodbus\.client\.asynchronous\.thread module
---------------------------------------------

.. automodule:: pymodbus.client.asynchronous.thread
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.udp module
-----------------------------------
pymodbus\.client\.asynchronous\.udp module
------------------------------------------

.. automodule:: pymodbus.client.asynchronous.udp
:members:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pymodbus\.client\.async\.schedulers package
===========================================
pymodbus\.client\.asynchronous\.schedulers package
==================================================

.. automodule:: pymodbus.client.asynchronous.schedulers
:members:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/library/pymodbus.client.asynchronous.tornado.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pymodbus\.client\.async\.tornado package
========================================
pymodbus\.client\.asynchronous\.tornado package
===============================================

.. automodule:: pymodbus.client.asynchronous.tornado
:members:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/library/pymodbus.client.asynchronous.twisted.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pymodbus\.client\.async\.twisted package
========================================
pymodbus\.client\.asynchronous\.twisted package
===============================================

.. automodule:: pymodbus.client.asynchronous.twisted
:members:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/library/pymodbus.server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Submodules
----------

pymodbus\.server\.asynchronous module
------------------------------
-------------------------------------

.. automodule:: pymodbus.server.asynchronous
:members:
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/framer/ascii_framer.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def processIncomingPacket(self, data, callback, unit, **kwargs):
:param data: The new packet data
:param callback: The function to send results to
:param unit: Process if unit id matches, ignore otherwise (could be a
list of unit ids (server) or single unit id(client/server))
list of unit ids (server) or single unit id(client/server))
:param single: True or False (If True, ignore unit address validation)

"""
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/framer/binary_framer.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def processIncomingPacket(self, data, callback, unit, **kwargs):
:param data: The new packet data
:param callback: The function to send results to
:param unit: Process if unit id matches, ignore otherwise (could be a
list of unit ids (server) or single unit id(client/server)
list of unit ids (server) or single unit id(client/server)
:param single: True or False (If True, ignore unit address validation)

"""
Expand Down
3 changes: 2 additions & 1 deletion pymodbus/framer/rtu_framer.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ def processIncomingPacket(self, data, callback, unit, **kwargs):
:param data: The new packet data
:param callback: The function to send results to
:param unit: Process if unit id matches, ignore otherwise (could be a
list of unit ids (server) or single unit id(client/server)
list of unit ids (server) or single unit id(client/server)
:param single: True or False (If True, ignore unit address validation)

"""
if not isinstance(unit, (list, tuple)):
unit = [unit]
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/framer/socket_framer.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def processIncomingPacket(self, data, callback, unit, **kwargs):
:param data: The new packet data
:param callback: The function to send results to
:param unit: Process if unit id matches, ignore otherwise (could be a
list of unit ids (server) or single unit id(client/server)
list of unit ids (server) or single unit id(client/server)
:param single: True or False (If True, ignore unit address validation)

"""
Expand Down
6 changes: 6 additions & 0 deletions pymodbus/repl/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,11 @@ def report_slave_id(self, **kwargs):
def read_exception_status(self, **kwargs):
"""
Read the contents of eight Exception Status outputs in a remote device.

:param unit: The slave unit this request is targeting

:return:

"""
request = ReadExceptionStatusRequest(**kwargs)
resp = self.execute(request)
Expand All @@ -311,8 +314,11 @@ def get_com_event_counter(self, **kwargs):
"""
Read status word and an event count from the remote device's communication
event counter

:param unit: The slave unit this request is targeting

:return:

"""
request = GetCommEventCounterRequest(**kwargs)
resp = self.execute(request)
Expand Down
18 changes: 15 additions & 3 deletions pymodbus/repl/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,44 +49,56 @@ def command_names(self):
return self._commands.keys()

def completing_command(self, words, word_before_cursor):
"""Determine if we are currently completing the hn command.
"""
Determine if we are currently completing the hn command.

:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: bool

:return: Specifies whether we are currently completing the hn command.

"""
if len(words) == 1 and word_before_cursor != '':
return True
else:
return False

def completing_arg(self, words, word_before_cursor):
"""Determine if we are currently completing an arg.
"""
Determine if we are currently completing an arg.

:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: bool

:return: Specifies whether we are currently completing an arg.

"""
if len(words) > 1 and word_before_cursor != '':
return True
else:
return False

def arg_completions(self, words, word_before_cursor):
"""Generates arguments completions based on the input.
"""
Generates arguments completions based on the input.

:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: list

:return: A list of completions.

"""
cmd = words[0].strip()
cmd = self._commands.get(cmd, None)
Expand Down
23 changes: 14 additions & 9 deletions pymodbus/server/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,18 @@ def _is_main_thread():

def StartTcpServer(context, identity=None, address=None,
console=False, defer_reactor_run=False, **kwargs):
""" Helper method to start the Modbus Async TCP server
"""
Helper method to start the Modbus Async TCP server

:param context: The server data context
:param identify: The server identity to use (default empty)
:param address: An optional (interface, port) to bind to.
:param console: A flag indicating if you want the debug console
:param ignore_missing_slaves: True to not send errors on a request
to a missing slave
to a missing slave
:param defer_reactor_run: True/False defer running reactor.run() as part
of starting server, to be explictly started by the user
of starting server, to be explictly started by the user

"""
from twisted.internet import reactor

Expand All @@ -258,15 +260,16 @@ def StartTcpServer(context, identity=None, address=None,

def StartUdpServer(context, identity=None, address=None,
defer_reactor_run=False, **kwargs):
""" Helper method to start the Modbus Async Udp server
"""
Helper method to start the Modbus Async Udp server

:param context: The server data context
:param identify: The server identity to use (default empty)
:param address: An optional (interface, port) to bind to.
:param ignore_missing_slaves: True to not send errors on a request
to a missing slave
to a missing slave
:param defer_reactor_run: True/False defer running reactor.run() as part
of starting server, to be explictly started by the user
of starting server, to be explictly started by the user
"""
from twisted.internet import reactor

Expand All @@ -284,7 +287,8 @@ def StartSerialServer(context, identity=None,
framer=ModbusAsciiFramer,
defer_reactor_run=False,
**kwargs):
""" Helper method to start the Modbus Async Serial server
"""
Helper method to start the Modbus Async Serial server

:param context: The server data context
:param identify: The server identity to use (default empty)
Expand All @@ -293,9 +297,10 @@ def StartSerialServer(context, identity=None,
:param baudrate: The baud rate to use for the serial device
:param console: A flag indicating if you want the debug console
:param ignore_missing_slaves: True to not send errors on a request to a
missing slave
missing slave
:param defer_reactor_run: True/False defer running reactor.run() as part
of starting server, to be explictly started by the user
of starting server, to be explictly started by the user

"""
from twisted.internet import reactor
from twisted.internet.serialport import SerialPort
Expand Down
3 changes: 3 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ SQLAlchemy==1.1.15 # Required to parse some files
tornado==4.5.2 # Required to parse some files
twisted>= 12.2.0 # Required to parse some files
prompt_toolkit>=2.0.4
click>=6.7
m2r>=0.2.0