Skip to content

Commit 6639ad2

Browse files
committed
Updated documentation.
1 parent 72519ab commit 6639ad2

File tree

5 files changed

+40
-47
lines changed

5 files changed

+40
-47
lines changed

README.rst

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,35 @@
1-
Simple RPC implementation for Arduino.
2-
======================================
1+
Arduino SimpleRPC Python client
2+
===============================
33

4-
.. image:: https://img.shields.io/github/last-commit/jfjlaros/simpleRPC.svg
5-
:target: https://github.com/jfjlaros/simpleRPC/graphs/commit-activity
6-
.. image:: https://travis-ci.org/jfjlaros/simpleRPC.svg?branch=master
7-
:target: https://travis-ci.org/jfjlaros/simpleRPC
4+
.. image:: https://img.shields.io/github/last-commit/jfjlaros/arduino-simple-rpc.svg
5+
:target: https://github.com/jfjlaros/arduino-simple-rpc/graphs/commit-activity
6+
.. image:: https://travis-ci.org/jfjlaros/arduino-simple-rpc.svg?branch=master
7+
:target: https://travis-ci.org/jfjlaros/arduino-simple-rpc
88
.. image:: https://readthedocs.org/projects/simplerpc/badge/?version=latest
9-
:target: https://simpleRPC.readthedocs.io/en/latest
10-
.. image:: https://img.shields.io/github/release-date/jfjlaros/simpleRPC.svg
11-
:target: https://github.com/jfjlaros/simpleRPC/releases
12-
.. image:: https://img.shields.io/github/release/jfjlaros/simpleRPC.svg
13-
:target: https://github.com/jfjlaros/simpleRPC/releases
9+
:target: https://arduino-simple-rpc.readthedocs.io/en/latest
10+
.. image:: https://img.shields.io/github/release-date/jfjlaros/arduino-simple-rpc.svg
11+
:target: https://github.com/jfjlaros/arduino-simple-rpc/releases
12+
.. image:: https://img.shields.io/github/release/jfjlaros/arduino-simple-rpc.svg
13+
:target: https://github.com/jfjlaros/arduino-simple-rpc/releases
1414
.. image:: https://img.shields.io/pypi/v/arduino-simple-rpc.svg
1515
:target: https://pypi.org/project/arduino-simple-rpc/
16-
.. image:: https://img.shields.io/github/languages/code-size/jfjlaros/simpleRPC.svg
17-
:target: https://github.com/jfjlaros/simpleRPC
18-
.. image:: https://img.shields.io/github/languages/count/jfjlaros/simpleRPC.svg
19-
:target: https://github.com/jfjlaros/simpleRPC
20-
.. image:: https://img.shields.io/github/languages/top/jfjlaros/simpleRPC.svg
21-
:target: https://github.com/jfjlaros/simpleRPC
22-
.. image:: https://img.shields.io/github/license/jfjlaros/simpleRPC.svg
23-
:target: https://raw.githubusercontent.com/jfjlaros/simpleRPC/master/LICENSE.md
16+
.. image:: https://img.shields.io/github/languages/code-size/jfjlaros/arduino-simple-rpc.svg
17+
:target: https://github.com/jfjlaros/arduino-simple-rpc
18+
.. image:: https://img.shields.io/github/languages/count/jfjlaros/arduino-simple-rpc.svg
19+
:target: https://github.com/jfjlaros/arduino-simple-rpc
20+
.. image:: https://img.shields.io/github/languages/top/jfjlaros/arduino-simple-rpc.svg
21+
:target: https://github.com/jfjlaros/arduino-simple-rpc
22+
.. image:: https://img.shields.io/github/license/jfjlaros/arduino-simple-rpc.svg
23+
:target: https://raw.githubusercontent.com/jfjlaros/arduino-simple-rpc/master/LICENSE.md
2424

2525
----
2626

27-
This library provides a simple way to export Arduino_ functions as remote
28-
procedure calls. The exported method definitions are communicated to the host,
29-
which is then able to generate an API interface.
27+
This library provides a simple way to interface to Arduino_ functions exported
28+
with the simpleRPC_ protocol. The exported method definitions are communicated
29+
to the host, which is then able to generate an API interface using this
30+
library.
3031

31-
For each method, only one additional line of code is needed for exporting. On
32-
the host, only one function call is needed to perform a remote procedure call.
33-
34-
The Arduino library is independent of any host implementation, we provide a
35-
Python API library as a reference implementation.
32+
Only one function call is needed to perform a remote procedure call.
3633

3734
Please see ReadTheDocs_ for the latest documentation.
3835

@@ -96,15 +93,10 @@ This is reflected on the host.
9693
0
9794
>>> interface.digital_write(13, True)
9895
99-
Please read :doc:`usage_device` for more information about exporting normal
100-
functions, class member functions and documentation conventions.
101-
10296
For more information about the host library and other interfaces, please see
103-
the :doc:`usage_host` section.
104-
105-
If you want to create your own host library implementation for other
106-
programming languages, the section :doc:`protocol` should help you on your way.
97+
the :doc:`usage` section.
10798

10899

109100
.. _Arduino: https://www.arduino.cc
101+
.. _simpleRPC: https://simpleRPC.readthedocs.io/en/latest/index.html
110102
.. _ReadTheDocs: https://simpleRPC.readthedocs.io/en/latest/index.html

docs/index.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
.. simpleRPC documentation.
2-
31
.. include:: ../README.rst
42

53
.. toctree::
64
:maxdepth: 2
75
:caption: Contents:
86

97
introduction
10-
install_device
11-
install_host
12-
usage_device
13-
usage_host
14-
protocol
8+
install
9+
usage
1510
credits

docs/install.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Host installation
2-
=================
1+
Installation
2+
============
33

44
The software is distributed via PyPI_, it can be installed with ``pip``:
55

examples/wsgi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
from simple_rpc import Interface
55

66

7-
app = Flask(__name__)
8-
api = Api(app)
9-
107
_types = {'str': 'string'}
118

129
code = '''
1310
@api.route('/{name}/{params}')
1411
class {name}(Resource):
15-
def get(self{args}):
12+
def post(self{args}):
1613
"""{doc}"""
1714
return interface.call_method('{name}'{args})
1815
'''
@@ -36,6 +33,9 @@ def add_call(method):
3633

3734

3835
if __name__ == '__main__':
36+
app = Flask(__name__)
37+
api = Api(app)
38+
3939
interface = Interface('/dev/ttyACM0')
4040

4141
for method in interface.methods.values():

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[tox]
2+
envlist = py34, py35, py36
3+
4+
[testenv]
5+
commands = py.test
6+
whitelist_externals = py.test

0 commit comments

Comments
 (0)