Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9726a58
WriteMultipleRegistersRequest: Handle values=None case
sjlongland Jun 3, 2015
356b225
Fix payload tests.
sjlongland Jun 4, 2015
3263801
sync.ModbusUdpClient: Correct reference to settimeout.
sjlongland Jun 4, 2015
e27dbb4
test-client-sync: Fix UDP connection test.
sjlongland Jun 4, 2015
6c7edfc
Merge pull request #88 from vrtsystems/fix-udp-sync-client
bashwork Sep 26, 2015
cd9da27
Merge pull request #79 from BartDeWaal/master
bashwork Sep 26, 2015
175abc9
Merge pull request #81 from estan/master
bashwork Sep 26, 2015
9b71d5f
Implement mask_write_register method in client mixin
inguin Oct 5, 2015
0b9a2e3
Merge pull request #100 from inguin/master
bashwork Oct 13, 2015
60a7266
Adding modbus payload example
Oct 22, 2015
d4c57c6
Minor corrections in docs
jbiswas Jan 7, 2016
4fd5847
Fix RTU frame size for MEI Read Device Info request
Feb 24, 2016
b951503
Added test case to cover RTU frame size calculation
Feb 24, 2016
4dcd54c
Merge pull request #115 from hamiltonkibbe/read_device_info_fix
bashwork Jun 6, 2016
29d236e
Merge pull request #112 from jbiswas/master
bashwork Jun 6, 2016
ce4fbbf
ModiconPayloadDecoder __init__ fail
semyont Jul 26, 2016
844c75d
Update README.rst
HynekPetrak Sep 23, 2016
99f16da
Merge pull request #132 from HynekPetrak/master
bashwork Sep 28, 2016
ea6a97b
Merge pull request #130 from semyont/patch-1
bashwork Sep 28, 2016
2f45efb
Deleting an extra 'zero' @ default port
Dec 9, 2016
8103978
Merge pull request #144 from mfrata/patch-1
bashwork Jan 4, 2017
9d3629a
Fix doc typo
francozappa Mar 27, 2017
644760a
Merge pull request #154 from francozappa/fix-typo
dhoomakethu May 12, 2017
1d754c9
#162 preparing for 1.3.0
dhoomakethu May 12, 2017
f1265dd
#162 preparing for 1.3.0 - fix tests on MACOSX
dhoomakethu May 12, 2017
e7a20c6
Merge pull request #163 from riptideio/dev
dhoomakethu May 12, 2017
edec5d0
Dev (#164)
dhoomakethu May 17, 2017
e06653d
Update CHANGELOG.rst
dhoomakethu May 17, 2017
b49cea7
Update README.rst
dhoomakethu May 17, 2017
46f735f
Add CI support (#168)
dhoomakethu May 20, 2017
6df49dd
Update README.rst
dhoomakethu May 20, 2017
0c90ba7
Update README.rst
dhoomakethu May 20, 2017
216121f
Enhancement ModbusTcpClient Timeout (#140)
semyont May 21, 2017
d863c76
updated gitignore
dhoomakethu May 21, 2017
e5e3985
Update README.rst
dhoomakethu May 22, 2017
faa01f6
Preparing for 1.3.0rc2 release (#172)
dhoomakethu May 27, 2017
c1ece03
Update README.rst
dhoomakethu May 27, 2017
6f5f482
* register_write_message.py: Observe skip_encode option when encoding…
bje- May 29, 2017
661c816
Recall socket recv until get a complete response. (#143)
ccatterina Jun 5, 2017
90f9169
Revert "Recall socket recv until get a complete response. (#143)" (#178)
dhoomakethu Jun 5, 2017
8f86e77
fix error calculating response pdu length for read coil/discrete inpu…
dhoomakethu Jun 8, 2017
a126e4b
Remote single slave context refers to instance (#133)
fleimgruber Jun 17, 2017
559c7b8
Recall socket recv until get a complete response. (#180)
ccatterina Jun 22, 2017
e8ef2ef
1.3.1 release (#185)
dhoomakethu Jun 24, 2017
6e40f9c
v1.3.2 (#208)
dhoomakethu Aug 23, 2017
dda3c39
Create .gitattributes
dhoomakethu Oct 6, 2017
8eafcb1
Update .gitattributes
dhoomakethu Oct 6, 2017
7929316
Update .gitattributes
dhoomakethu Oct 6, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[report]
show_missing = True
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
doc export-ignore
test export-ignore
examples export-ignore
scripts export-ignore
.* export-ignore

16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,19 @@ build/
dist/
pymodbus.egg-info/
.coverage
.vscode
.idea
.noseids

.idea/
.tox/
doc/api/epydoc/html/
.vscode/
.venv
__pycache__/
pymodbus/__pycache__/
pymodbus/client/__pycache__/
pymodbus/datastore/__pycache__/
pymodbus/internal/__pycache__/
pymodbus/server/__pycache__/
test/__pycache__/
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
sudo: false
language: python
matrix:
include:
- os: linux
python: "2.7"
- os: linux
python: "3.4"
- os: linux
python: "3.5"
- os: linux
python: "3.6"
- os: osx
language: generic
before_install:
- if [ $TRAVIS_OS_NAME = osx ]; then brew update; fi
- if [ $TRAVIS_OS_NAME = osx ]; then brew install openssl; fi

install:
# - scripts/travis.sh pip install pip-accel
- scripts/travis.sh pip install coveralls
- scripts/travis.sh pip install --requirement=requirements-checks.txt
- scripts/travis.sh pip install --requirement=requirements-tests.txt
- scripts/travis.sh LC_ALL=C pip install .
script:
# - scripts/travis.sh make check
- scripts/travis.sh make test
after_success:
- scripts/travis.sh coveralls
branches:
except:
- /^[0-9]/
34 changes: 33 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
Version 1.2.0

Version 1.3.2
------------------------------------------------------------
* ModbusSerialServer could now be stopped when running on a seperate thread.
* Fix issue with server and client where in the frame buffer had values from previous unsuccesful transaction
* Fix response length calculation for ModbusASCII protocol
* Fix response length calculation ReportSlaveIdResponse, DiagnosticStatusResponse
* Fix never ending transaction case when response is recieved without header and CRC
* Fix tests

Version 1.3.1
------------------------------------------------------------
* Recall socket recv until get a complete response
* Register_write_message.py: Observe skip_encode option when encoding a single register request
* Fix wrong expected response length for coils and discrete inputs
* Fix decode errors with ReadDeviceInformationRequest and ReportSlaveIdRequest on Python3
* Move MaskWriteRegisterRequest/MaskWriteRegisterResponse to register_write_message.py from file_message.py
* Python3 compatible examples [WIP]
* Misc updates with examples

Version 1.3.0.rc2
------------------------------------------------------------
* Fix encoding problem for ReadDeviceInformationRequest method on python3
* Fix problem with the usage of ord in python3 while cleaning up receive buffer
* Fix struct unpack errors with BinaryPayloadDecoder on python3 - string vs bytestring error
* Calculate expected response size for ReadWriteMultipleRegistersRequest
* Enhancement for ModbusTcpClient, ModbusTcpClient can now accept connection timeout as one of the parameter
* Misc updates

Version 1.3.0.rc1
------------------------------------------------------------
* Timing improvements over MODBUS Serial interface
* Modbus RTU use 3.5 char silence before and after transactions
* Bug fix on FifoTransactionManager , flush stray data before transaction
* Update repository information
* Added ability to ignore missing slaves
* Added ability to revert to ZeroMode
* Passed a number of extra options through the stack
Expand Down
64 changes: 64 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Makefile for the `pymodbus' package.

WORKON_HOME ?= $(HOME)/.virtualenvs
VIRTUAL_ENV ?= $(WORKON_HOME)/pymodbus
PATH := $(VIRTUAL_ENV)/bin:$(PATH)
MAKE := $(MAKE) --no-print-directory
SHELL = bash

default:
@echo 'Makefile for pymodbus'
@echo
@echo 'Usage:'
@echo
@echo ' make install install the package in a virtual environment'
@echo ' make reset recreate the virtual environment'
@echo ' make check check coding style (PEP-8, PEP-257)'
@echo ' make test run the test suite, report coverage'
@echo ' make tox run the tests on all Python versions'
@echo ' make clean cleanup all temporary files'
@echo

install:
@test -d "$(VIRTUAL_ENV)" || mkdir -p "$(VIRTUAL_ENV)"
@test -x "$(VIRTUAL_ENV)/bin/python" || virtualenv --quiet "$(VIRTUAL_ENV)"
@test -x "$(VIRTUAL_ENV)/bin/pip" || easy_install pip
@pip install --quiet --requirement=requirements.txt
@pip uninstall --yes pymodbus &>/dev/null || true
@pip install --quiet --no-deps --ignore-installed .

reset:
$(MAKE) clean
rm -Rf "$(VIRTUAL_ENV)"
$(MAKE) install

check: install
@pip install --upgrade --quiet --requirement=requirements-checks.txt
@flake8

test: install
@pip install --quiet --requirement=requirements-tests.txt
@nosetests --with-coverage --cover-html
@coverage report --fail-under=90

tox: install
@pip install --quiet tox && tox

docs: install
@pip install --quiet sphinx
@cd doc/sphinx && sphinx-build -nb html -d doctrees . html

publish: install
git push origin && git push --tags origin
$(MAKE) clean
pip install --quiet twine wheel
python setup.py sdist bdist_wheel
twine upload dist/*
$(MAKE) clean

clean:
@rm -Rf *.egg .cache .coverage .tox build dist docs/build htmlcov
@find -depth -type d -name __pycache__ -exec rm -Rf {} \;
@find -type f -name '*.pyc' -delete

.PHONY: default install reset check test tox docs publish clean
47 changes: 44 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.. image:: https://travis-ci.org/riptideio/pymodbus.svg?branch=master
:target: https://travis-ci.org/riptideio/pymodbus

.. image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/pymodbus_dev/Lobby

.. image:: https://readthedocs.org/projects/pymodbus-n/badge/?version=latest
:target: http://pymodbus-n.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

============================================================
Summary
============================================================
Expand Down Expand Up @@ -49,6 +59,9 @@ a user to test as many devices as their base operating system will allow (*allow
in this case means how many Virtual IP addresses are allowed).

For more information please browse the project documentation:

http://riptideio.github.io/pymodbus/
or
http://readthedocs.org/docs/pymodbus/en/latest/index.html

------------------------------------------------------------
Expand All @@ -72,7 +85,8 @@ need, feel free to submit them so others can benefit.
Also, if you have questions, please ask them on the mailing list
so that others can benefit from the results and so that I can
trace them. I get a lot of email and sometimes these requests
get lost in the noise: http://groups.google.com/group/pymodbus
get lost in the noise: http://groups.google.com/group/pymodbus or
at gitter: https://gitter.im/pymodbus_dev/Lobby

------------------------------------------------------------
Installing
Expand Down Expand Up @@ -111,19 +125,46 @@ like your device tested, I accept devices via mail or by IP address.
That said, the current work mainly involves polishing the library as
I get time doing such tasks as:

* Make PEP-8 compatible and flake8 ready
* Fixing bugs/feature requests
* Architecture documentation
* Functional testing against any reference I can find
* The remaining edges of the protocol (that I think no one uses)


------------------------------------------------------------
Development Instructions
------------------------------------------------------------
The current code base is compatible with both py2 and py3.
Use make to perform a range of activities

::

$ make
Makefile for pymodbus

Usage:

make install install the package in a virtual environment
make reset recreate the virtual environment
make check check coding style (PEP-8, PEP-257)
make test run the test suite, report coverage
make tox run the tests on all Python versions
make clean cleanup all temporary files

------------------------------------------------------------
Contributing
------------------------------------------------------------
Just fork the repo and raise your PR against `dev` branch.

------------------------------------------------------------
License Information
------------------------------------------------------------

Pymodbus is built on top of code developed from/by:
* Copyright (c) 2001-2005 S.W.A.C. GmbH, Germany.
* Copyright (c) 2001-2005 S.W.A.C. Bohemia s.r.o., Czech Republic.
* Hynek Petrak <[email protected]>

* Hynek Petrak, https://github.com/HynekPetrak
* Twisted Matrix

Released under the BSD License
Loading