# python-can-cando
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/python-can-cando)](https://pypi.org/project/python-can-cando/)
[![PyPI - Version](https://img.shields.io/pypi/v/python-can-cando)](https://pypi.org/project/python-can-cando/)
[![PyPI Downloads](https://static.pepy.tech/badge/python-can-cando)](https://www.pepy.tech/projects/python-can-cando)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-can-cando)](https://pypi.org/project/python-can-cando/)
-----
- [Description](#description)
- [Installation](#installation)
- [Usage](#usage)
- [Extra information](#extra-information)
- [A note on bus load](#a-note-on-bus-load)
- [Compatibility](#compatibility)
- [License](#license)
## Description
This module is a plugin that lets you use [netronics](http://www.netronics.ltd.uk/)' can adapters (namely the [CANdo](https://www.cananalyser.co.uk/cando.html) and [CANdoISO](https://www.cananalyser.co.uk/candoiso.html) devices) in [python-can](https://python-can.readthedocs.io/en/stable/)'s [plugin interface](https://python-can.readthedocs.io/en/stable/plugin-interface.html).
## Installation
You should have installed the [netronics' CANdo drivers](https://www.cananalyser.co.uk/download.html) before using this library; otherwise you will get a DLL error (or, under linux, a shared library error).
```console
pip install python-can-cando
```
## Usage
Just like any other `python-can` plugin, you can access the class like so:
```python
import can
bus = can.Bus(interface="cando", channel=0)
# All of your other python-can code...
```
Or you could just instantiate it directly:
```python
from can_cando import CANdoBus
bus = CANdoBus(channel=0)
# All of your other python-can code...
```
## Extra information
There are some inherent limitations to this device; you should really check the programmer's guide and the actual implementation of some methods, such as the `cando_transmit`'s documentation on how to use the device's internal repeat buffers; the number of such available buffers and message timing periodicity is fixed and limited. The implementation of `BusABC.send_periodic` is intentionally dummy-overridden for this reason.
Anyways, the programmer's guide and all the relative datasheets for the devices can be downloaded from [netronics' download page](https://www.cananalyser.co.uk/download.html).
###### A note on bus load
I found that the device tends to get the `CANDO_CAN_RX_OVERRUN` status if there is either too much bus load or sudden spikes of bus load (and therefore it loses some can messages); if you have other nodes in the network that send a lot of periodic messages with a short period, you might consider using the appropriate filters, rather that just reading all the messages and filtering them in software.
## Compatibility
I developed this library with a CANdoISO device; I don't have a CANdo device to test it, but it should work just as well.
There are some minor differences between the two (for example a different clock frequency), but from a software point of view the interfaces are very similar.
This library was developed and tested on Windows 10 and python 3.12, but it should be good to go with python up till 3.7 (checked with [vermin](https://github.com/netromdk/vermin)) and non-Windows OSs.
Anyways, any feedback is appreciated and welcome; just open an issue or a pull request and I'll gladly take a look at it.
## License
`python-can-cando` is distributed under the terms of the [LGPL-3.0-or-later](https://spdx.org/licenses/LGPL-3.0-or-later.html) license.
[def]: #python-can-cando
Raw data
{
"_id": null,
"home_page": null,
"name": "python-can-cando",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "python-can, CAN, CANbus, netronics, cando, candoiso",
"author": null,
"author_email": "Riccardo Belli <riccardo.belli@solaredge.com>",
"download_url": "https://files.pythonhosted.org/packages/b4/7e/9a25bce573a287b2a6f20164226126cced8ce14753d9487b26220b0daefc/python_can_cando-1.0.6.tar.gz",
"platform": null,
"description": "# python-can-cando\r\n\r\n[![PyPI - Implementation](https://img.shields.io/pypi/implementation/python-can-cando)](https://pypi.org/project/python-can-cando/)\r\n[![PyPI - Version](https://img.shields.io/pypi/v/python-can-cando)](https://pypi.org/project/python-can-cando/)\r\n[![PyPI Downloads](https://static.pepy.tech/badge/python-can-cando)](https://www.pepy.tech/projects/python-can-cando)\r\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-can-cando)](https://pypi.org/project/python-can-cando/)\r\n\r\n-----\r\n\r\n- [Description](#description)\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Extra information](#extra-information)\r\n - [A note on bus load](#a-note-on-bus-load)\r\n- [Compatibility](#compatibility)\r\n- [License](#license)\r\n\r\n## Description\r\nThis module is a plugin that lets you use [netronics](http://www.netronics.ltd.uk/)' can adapters (namely the [CANdo](https://www.cananalyser.co.uk/cando.html) and [CANdoISO](https://www.cananalyser.co.uk/candoiso.html) devices) in [python-can](https://python-can.readthedocs.io/en/stable/)'s [plugin interface](https://python-can.readthedocs.io/en/stable/plugin-interface.html).\r\n\r\n## Installation\r\n\r\nYou should have installed the [netronics' CANdo drivers](https://www.cananalyser.co.uk/download.html) before using this library; otherwise you will get a DLL error (or, under linux, a shared library error).\r\n\r\n```console\r\npip install python-can-cando\r\n```\r\n\r\n## Usage\r\n\r\nJust like any other `python-can` plugin, you can access the class like so:\r\n\r\n```python\r\nimport can\r\nbus = can.Bus(interface=\"cando\", channel=0)\r\n# All of your other python-can code...\r\n```\r\n\r\nOr you could just instantiate it directly:\r\n\r\n```python\r\nfrom can_cando import CANdoBus\r\nbus = CANdoBus(channel=0)\r\n# All of your other python-can code...\r\n```\r\n\r\n## Extra information\r\n\r\nThere are some inherent limitations to this device; you should really check the programmer's guide and the actual implementation of some methods, such as the `cando_transmit`'s documentation on how to use the device's internal repeat buffers; the number of such available buffers and message timing periodicity is fixed and limited. The implementation of `BusABC.send_periodic` is intentionally dummy-overridden for this reason.\r\n\r\nAnyways, the programmer's guide and all the relative datasheets for the devices can be downloaded from [netronics' download page](https://www.cananalyser.co.uk/download.html).\r\n\r\n###### A note on bus load\r\n\r\nI found that the device tends to get the `CANDO_CAN_RX_OVERRUN` status if there is either too much bus load or sudden spikes of bus load (and therefore it loses some can messages); if you have other nodes in the network that send a lot of periodic messages with a short period, you might consider using the appropriate filters, rather that just reading all the messages and filtering them in software.\r\n\r\n## Compatibility\r\nI developed this library with a CANdoISO device; I don't have a CANdo device to test it, but it should work just as well.\r\nThere are some minor differences between the two (for example a different clock frequency), but from a software point of view the interfaces are very similar.\r\n\r\nThis library was developed and tested on Windows 10 and python 3.12, but it should be good to go with python up till 3.7 (checked with [vermin](https://github.com/netromdk/vermin)) and non-Windows OSs.\r\n\r\nAnyways, any feedback is appreciated and welcome; just open an issue or a pull request and I'll gladly take a look at it.\r\n\r\n## License\r\n\r\n`python-can-cando` is distributed under the terms of the [LGPL-3.0-or-later](https://spdx.org/licenses/LGPL-3.0-or-later.html) license.\r\n\r\n[def]: #python-can-cando\r\n",
"bugtrack_url": null,
"license": "LGPL v3",
"summary": "python-can interface for Netronics CANdo and CANdoISO devices",
"version": "1.0.6",
"project_urls": {
"Documentation": "https://github.com/belliriccardo/python-can-cando#readme",
"Homepage": "https://github.com/belliriccardo/python-can-cando",
"Issues": "https://github.com/belliriccardo/python-can-cando/issues",
"Source": "https://github.com/belliriccardo/python-can-cando"
},
"split_keywords": [
"python-can",
" can",
" canbus",
" netronics",
" cando",
" candoiso"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "87feb5b23265b6d4132a777da6f6cae5fd0e0872e554c2e547e6dfe0a83ffef5",
"md5": "2e7b0b3ffaaea24c606c769c6a1dd702",
"sha256": "dc6d7d68922b8f78474061448d1454d22df4bc9bc35bbd8b3c9172d7567b92c0"
},
"downloads": -1,
"filename": "python_can_cando-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2e7b0b3ffaaea24c606c769c6a1dd702",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 23691,
"upload_time": "2024-11-11T08:13:37",
"upload_time_iso_8601": "2024-11-11T08:13:37.295206Z",
"url": "https://files.pythonhosted.org/packages/87/fe/b5b23265b6d4132a777da6f6cae5fd0e0872e554c2e547e6dfe0a83ffef5/python_can_cando-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b47e9a25bce573a287b2a6f20164226126cced8ce14753d9487b26220b0daefc",
"md5": "0c26438298f4cd9d7e105bb493bcf8c8",
"sha256": "053b30d4a01b80c856e9aac53dc3f3caa3792ccc26c8e321dc9e77317f104cfe"
},
"downloads": -1,
"filename": "python_can_cando-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "0c26438298f4cd9d7e105bb493bcf8c8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 24557,
"upload_time": "2024-11-11T08:13:38",
"upload_time_iso_8601": "2024-11-11T08:13:38.763359Z",
"url": "https://files.pythonhosted.org/packages/b4/7e/9a25bce573a287b2a6f20164226126cced8ce14753d9487b26220b0daefc/python_can_cando-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 08:13:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "belliriccardo",
"github_project": "python-can-cando#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "python-can",
"specs": [
[
">=",
"4.0.0"
]
]
}
],
"lcname": "python-can-cando"
}