Skip to main content

This package extend the python-can with the broqer package. This provides the functionality to work in a reactive style with can signals and messages.

Project description

python-canbro

the name of the package canbro arose from can and broqer which are the two main python packages which are used in this combination. Additionaly the cantools is also a main contributer for now. But maybe will be replaced with a own implementation in future.

This package use the python-can and extend the python-cantools with the python-broqer package. There the functionality to work in a reactive style with can signals and messages will be provided.

Dependencies

canbro requires the following dependencies:

  • can (version 4.3.1 or later)
  • cantools (version 39.4.4 or later)
  • broqer (version 3.0.3 or later)

Usage

example cylce messages

from can.interface import Bus
from cantools.database import load_file
from broqer import Sink
from canbro import Node

# load dbc file
db = load_file('device_CAN.dbc')

# create ECU node with virtual bus test
bus_e= Bus('test', interface='virtual')
ecu = Node(name="ECU",bus=bus_e,database=db )

# create VCU node with virtual bus test, and connect to ECU via same name of bus -> test
bus_v= Bus('test', interface='virtual')
vcu= Node(name='CONTROL',bus=bus_v,database=db )

def show_vcu_value(value):
    print( 'value={}'.format(value) , end='')

show_print = ecu.DEM._signal_operation_mode.subscribe(Sink(show_vcu_value))

vcu.DEM.start_periodic()

vcu.DEM._signal_operation_mode.notify(2)

License

canbro is licensed under the MIT License. See the LICENSE file for more information.

Author

canbro was created by Lukas Riegler. Contact him via a issue on github.

Version

canbro version 0.0.1 in progress.

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

canbro-0.1.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

canbro-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file canbro-0.1.0.tar.gz.

File metadata

  • Download URL: canbro-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for canbro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0803c6fa56746a0cbe5ee36ee0123e98c860408e46477a033e5566953cde07e
MD5 921d91cdf58deb5facf02aee9599308a
BLAKE2b-256 e1693497aa8bf16307fcdf3b07e7b422ceef902ce8689b9194c4fda807b5d81a

See more details on using hashes here.

File details

Details for the file canbro-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: canbro-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for canbro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 742721f85c35ade93ef34a1e8da42d0044a7d9492dc3e91a76c06796fecf5b95
MD5 24c84c047f232e9c14d40605fbbdc07e
BLAKE2b-256 fc126aa4ed811bc3ba21ada584855dea3ffb5cd26ec00a14a0fc973e774a169c

See more details on using hashes here.

Supported by

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