@@ -9,8 +9,8 @@ python-can
99
1010.. |docs | image :: https://readthedocs.org/projects/python-can/badge/?version=stable
1111 :target: https://python-can.readthedocs.io/en/stable/
12- :alt: Documentation build Status
13-
12+ :alt: Documentation
13+
1414.. |build_travis | image :: https://travis-ci.org/hardbyte/python-can.svg?branch=develop
1515 :target: https://travis-ci.org/hardbyte/python-can/branches
1616 :alt: Travis CI Server for develop branch
@@ -22,15 +22,56 @@ python-can
2222
2323The **C **\ ontroller **A **\ rea **N **\ etwork is a bus standard designed
2424to allow microcontrollers and devices to communicate with each other. It
25- has priority based bus arbitration, reliable deterministic
25+ has priority based bus arbitration and reliable deterministic
2626communication. It is used in cars, trucks, boats, wheelchairs and more.
2727
2828The ``can `` package provides controller area network support for
29- Python developers; providing ` common abstractions to
30- different hardware devices ` , and a suite of utilities for sending and receiving
29+ Python developers; providing common abstractions to
30+ different hardware devices, and a suite of utilities for sending and receiving
3131messages on a can bus.
3232
33- The library supports Python 2.7, Python 3.3+ as well as PyPy and runs on Mac, Linux and Windows.
33+ The library supports Python 2.7, Python 3.4+ as well as PyPy 2 & 3 and runs on Mac, Linux and Windows.
34+
35+
36+ Features
37+ --------
38+
39+ - common abstractions for CAN communication
40+ - support for many different backends (see the `docs <https://python-can.readthedocs.io/en/master/interfaces.html >`__)
41+ - receiving, sending, and periodically sending messages
42+ - normal and extended arbitration IDs
43+ - limited `CAN FD <https://en.wikipedia.org/wiki/CAN_FD >`__ support
44+ - many different loggers and readers supporting playback: ASC (CANalyzer format), BLF (Binary Logging Format by Vector), CSV, SQLite and Canutils log
45+ - efficient in-kernel or in-hardware filtering of messages on supported interfaces
46+ - bus configuration reading from file or environment variables
47+ - more
48+
49+
50+ Example usage
51+ -------------
52+
53+ ::
54+
55+ # import the library
56+ import can
57+
58+ # create a bus instance
59+ # many other interfaces are supported as well (see below)
60+ bus = can.Bus(interface='socketcan',
61+ channel='vcan0',
62+ receive_own_messages=True)
63+
64+ # send a message
65+ message = can.Message(arbitration_id=123, extended_id=True,
66+ data=[0x11, 0x22, 0x33])
67+ bus.send(message, timeout=0.2)
68+
69+ # iterate over received messages
70+ for msg in bus:
71+ print("{X}: {}".format(msg.arbitration_id, msg.data))
72+
73+ # or use an asynchronous notifier
74+ notifier = can.Notifier(bus, [can.Logger("recorded.log"), can.Printer()])
3475
3576You can find more information in the documentation, online at
3677`python-can.readthedocs.org <https://python-can.readthedocs.org/en/stable/ >`__.
@@ -40,7 +81,7 @@ Discussion
4081----------
4182
4283If you run into bugs, you can file them in our
43- `issue tracker <https://github.com/hardbyte/python-can/issues >`__.
84+ `issue tracker <https://github.com/hardbyte/python-can/issues >`__ on GitHub .
4485
4586There is also a `python-can <https://groups.google.com/forum/#!forum/python-can >`__
4687mailing list for development discussion.
@@ -51,6 +92,7 @@ questions and answers tagged with ``python+can``.
5192Wherever we interact, we strive to follow the
5293`Python Community Code of Conduct <https://www.python.org/psf/codeofconduct/ >`__.
5394
95+
5496Contributing
5597------------
5698
0 commit comments