Skip to main content

JSON-RPC proxy for talking Modbus over RTU and TCP.

Project description

.. image:: https://travis-ci.org/AdvancedClimateSystems/Tolk.svg?branch=master
:target: https://travis-ci.org/AdvancedClimateSystems/Tolk
.. image:: https://coveralls.io/repos/AdvancedClimateSystems/Tolk/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/AdvancedClimateSystems/Tolk?branch=master
.. image:: https://img.shields.io/pypi/v/tolk.svg
:target: https://pypi.python.org/pypi/Tolk/

Tolk
====

Tolk exposes a JSON-RPC API to talk Modbus over RTU or TCP and is written in
Python. The source can be found on GitHub_. Documentation is available at
`Read the Docs`_.

Quickstart
----------
Below you can find sample code how to start Tolk listening at a Unix Domain
Socket for JSON-RPC request. Tolk will delegate the requests via the
:class:`Dispatcher` to the :class:`modbus_tk.modbus_tcp.TcpMaster` which in
turn will request a Modbus slave at `localhost:502`.

.. code:: python

from modbus_tk.modbus_tcp import TcpMaster
from SocketServer import UnixStreamServer

from tolk import Dispatcher, Handler

# The TcpMaster will fire requests to a Modbus slave at localhost:502.
modbus_master = TcpMaster('localhost', 502)
dispatcher = Dispatcher(modbus_master)

server = UnixStreamServer('/tmp/tolk.sock', Handler)
server.dispatcher = dispatcher

server.serve_forever()

License
-------

This software is licensed under `Mozilla Public License`_. © 2015
`Advanced Climate Systems`_.

.. External References:
.. _Advanced Climate Systems: http://advancedclimate.nl
.. _GitHub: https://github.com/AdvancedClimateSystems/Tolk
.. _modbus_tcp_slave.py: scripts/modbus_tcp_slave.py
.. _Mozilla Public License: LICENSE
.. _pytest: http://pytest.org/latest/
.. _json_rpc_client.py: scripts/json_rpc_client.py
.. _tolk_server.py: scripts/tolk.py
.. _Read the Docs: https://tolk.readthedocs.org/en/latest/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Tolk-0.2.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Tolk-0.2.1-py2-none-any.whl (11.2 kB view details)

Uploaded Python 2

File details

Details for the file Tolk-0.2.1.tar.gz.

File metadata

  • Download URL: Tolk-0.2.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Tolk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 108d63b10dd4a5c52191271ed502eaf1f20d7661eeb388700414005ba43a43b1
MD5 c77fef27eee23931f696ecbbcde0cc89
BLAKE2b-256 b161d0255b2acff5d1c739a28d05a6539c7ecf12738df3fe65bcbf50b8fae431

See more details on using hashes here.

File details

Details for the file Tolk-0.2.1-py2-none-any.whl.

File metadata

  • Download URL: Tolk-0.2.1-py2-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Tolk-0.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 bc757fbbe7d54c90f43601b84547fefce5f8142ccbce41f2697115fe152cbc0f
MD5 13812ff1a3a04599c515bbaea93b9993
BLAKE2b-256 670a8986dd6de3e17345411f55908e1e63a34ebbd80b289b0d50deba8b0f84d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page