candycan
Features:
- Support both native SocketCAN and Python-CAN (SocketCAN, Kvaser, Vector, etc.)
- Production level data encapsulation with cached properties
- Message parsing with DBC file
- Automatic data validation via Pydantic
- Virtual CAN testing inside Jupyter notebook with multiprocessing support
- Highly efficient a2l file handling with lazy loading and dynamic properties
- Fast file loading by streaming json processing
It’s based on Python-CAN, Scapy, cantools and dbc-editor
Install
Install all the dependencies listed in can-env.yaml and then install candycan
pip install candycan
Data link layer (ISO 11898-1)
- Frame sending and receiving
- conversion from Python dict object to json and CAN frame
- message parsing with given dbc
- Multiprocessing support for testing inside the notebook
- Secure CAN device add/remove with password proctected gpg encryption
- Flexible arguments setting with argparse and subprocess pipes
- on native SocketCan or Python-CAN virtual CAN channel
- Options with Python-CAN or Scapy backends
- integrate can-utils, scapy sniff for large scale testing (tbd)
- extend to Kvaser, Vector, etc. (tbd)
CCP
- on physical CAN device (Kvaser) with Scapy application interface
- on physical CAN device with Python-CAN and CCP logic
- context manager for CCP functions
- CCP/XCP data codecs and data processing in Numpy array
- Bytes codecs (raw binary, hex, numeric) with endianess handling
- Flexible arguments setting with argparse and interactive InquirerPy
- Encapsulation of CAN specs in unified Pydantic models (serialization, schema, validation, annotation, etc.)
- Self incremental command counter inside CAN specs object
- Type systems for CAN (native SocketCAN, Python-CAN) and bus (SocketCAN, virtual CAN, Kvaser, Vector, etc.)
A2L
- a2l checking and fixing with pya2l and a2ltool
- conversion a2l file to legit json files
- al2 tree node, path and path segment definitions for positioning semantics
- searching of calibration terms
- Calibration object with dynamic properties for easy access of class attributes
- Cached properties for automatic data conversion and derivative properties like data size for corresponding data type
- Exception handling with missing calibration properties
- Unified processing of measurement, axis, conversion method and data layouts
- Lazy loading and streaming json file processing with events based ijson
- Encapsulation of calibration properties and values in Pydantic objects (automatic validation, serialization, schemes, etc.)
- Type systems for CCP/XCP data types
- XCPConfig for CCP/XCP configuration
- XCPData for encapsulating calibration data with automatic dimension, data size validation, automatic codecs of hex, raw and numeric values
- array view of table data as cached property with automatic type conversion and validation
- Create calibration data object from a2l file
- Get calibration data from downloaded json file
DBC
- load dbc files with cantools
- append new messages and signals to dbc files
- GUI for interactively modifying dbc on the command line with dbc-editor
XCP (tbd)
Metadata
Release files for candycan 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| candycan-0.0.1.tar.gz | 41.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| candycan-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.6 kB
Release files / candycan-0.0.1.tar.gz
| Download URL | candycan-0.0.1.tar.gz |
|---|---|
| Size | 41.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd6723187e4d20c3d311ce2078486b249953c29c91197c573a5f31d6c21c6d54
|
|
BLAKE2b-256 checksum How to use checksums |
78783fb0fd0332e1bc007dc7aad2dea764dd1a4f0fd798aa1714e37a7784fdb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Release files / candycan-0.0.1-py3-none-any.whl
| Download URL | candycan-0.0.1-py3-none-any.whl |
|---|---|
| Size | 52.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b5bad33ac864fa64f505a952970a4a7f5ee32e2980666724013ae551497ff58
|
|
BLAKE2b-256 checksum How to use checksums |
52d12c06d98ede4f6ab145e6f2b9407358358b9bbdefa44f4e77d4870a354121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|