Metadata-Version: 2.1
Name: canbro
Version: 0.1.0
Summary: 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-URL: Homepage, https://github.com/lki1354/python-canbro
Project-URL: Documentation, https://readthedocs.org
Project-URL: Repository, https://github.com/lki1354/python-canbro.git
Project-URL: Bug Tracker, https://github.com/lki1354/python-canbro/issues
Author-email: Lukas Riegler <lukasantonriegler@gmail.com>
Maintainer-email: Lukas Riegler <lukasantonriegler@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Lukas Riegler
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ARXML,DBC,can,reactive
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: broqer>=3.0.3
Requires-Dist: cantools>=39.4.4
Requires-Dist: python-can>=4.3.1
Description-Content-Type: text/markdown

# 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

```python
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.