# candycan
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
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
``` sh
pip install candycan
```
## [Data link layer (ISO 11898-1)](https://en.wikipedia.org/wiki/CAN_bus)
- 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](https://www.kernel.org/doc/html/next/networking/can.html)
or [Python-CAN](https://python-can.readthedocs.io/en/stable/) virtual
CAN channel
- Options with Python-CAN or
[Scapy](https://scapy.readthedocs.io/en/latest/introduction.html)
backends
- integrate [can-utils](https://github.com/linux-can/can-utils), scapy
[sniff](https://scapy.readthedocs.io/en/latest/usage.html) for large
scale testing (tbd)
- extend to Kvaser, Vector, etc. (tbd)
## [CCP](https://en.wikipedia.org/wiki/XCP_(protocol))
- 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](https://docs.pydantic.dev/latest/) 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](https://github.com/christoph2/pyA2L.git) and
[a2ltool](https://github.com/DanielT/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](https://github.com/ICRAR/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](https://github.com/cantools/cantools)
- append new messages and signals to dbc files
- GUI for interactively modifying dbc on the command line with
[dbc-editor](https://gitlab.com/erzo/dbc-editor)
## XCP (tbd)
Raw data
{
"_id": null,
"home_page": "https://github.com/Binjian/candycan",
"name": "candycan",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "nbdev jupyter notebook python",
"author": "binjian xin",
"author_email": "binjian.xin@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/78/78/3fb0fd0332e1bc007dc7aad2dea764dd1a4f0fd798aa1714e37a7784fdb4/candycan-0.0.1.tar.gz",
"platform": null,
"description": "# candycan\n\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nFeatures:\n\n- Support both native SocketCAN and Python-CAN (SocketCAN, Kvaser,\n Vector, etc.)\n- Production level data encapsulation with cached properties\n- Message parsing with DBC file\n- Automatic data validation via Pydantic\n- Virtual CAN testing inside Jupyter notebook with multiprocessing\n support\n- Highly efficient a2l file handling with lazy loading and dynamic\n properties\n- Fast file loading by streaming json processing\n\nIt\u2019s based on Python-CAN, Scapy, cantools and dbc-editor\n\n## Install\n\nInstall all the dependencies listed in can-env.yaml and then install\ncandycan\n\n``` sh\npip install candycan\n```\n\n## [Data link layer (ISO 11898-1)](https://en.wikipedia.org/wiki/CAN_bus)\n\n- Frame sending and receiving\n- conversion from Python dict object to json and CAN frame\n- message parsing with given dbc\n- Multiprocessing support for testing inside the notebook\n- Secure CAN device add/remove with password proctected gpg encryption\n- Flexible arguments setting with argparse and subprocess pipes\n- on native\n [SocketCan](https://www.kernel.org/doc/html/next/networking/can.html)\n or [Python-CAN](https://python-can.readthedocs.io/en/stable/) virtual\n CAN channel\n- Options with Python-CAN or\n [Scapy](https://scapy.readthedocs.io/en/latest/introduction.html)\n backends\n- integrate [can-utils](https://github.com/linux-can/can-utils), scapy\n [sniff](https://scapy.readthedocs.io/en/latest/usage.html) for large\n scale testing (tbd)\n- extend to Kvaser, Vector, etc. (tbd)\n\n## [CCP](https://en.wikipedia.org/wiki/XCP_(protocol))\n\n- on physical CAN device (Kvaser) with Scapy application interface\n- on physical CAN device with Python-CAN and CCP logic\n- context manager for CCP functions\n- CCP/XCP data codecs and data processing in Numpy array\n- Bytes codecs (raw binary, hex, numeric) with endianess handling\n- Flexible arguments setting with argparse and interactive InquirerPy\n- Encapsulation of CAN specs in unified\n [Pydantic](https://docs.pydantic.dev/latest/) models (serialization,\n schema, validation, annotation, etc.)\n- Self incremental command counter inside CAN specs object\n- Type systems for CAN (native SocketCAN, Python-CAN) and bus\n (SocketCAN, virtual CAN, Kvaser, Vector, etc.)\n\n## A2L\n\n- a2l checking and fixing with\n [pya2l](https://github.com/christoph2/pyA2L.git) and\n [a2ltool](https://github.com/DanielT/a2ltool)\n- conversion a2l file to legit json files\n- al2 tree node, path and path segment definitions for positioning\n semantics\n- searching of calibration terms\n- Calibration object with dynamic properties for easy access of class\n attributes\n- Cached properties for automatic data conversion and derivative\n properties like data size for corresponding data type\n- Exception handling with missing calibration properties\n- Unified processing of measurement, axis, conversion method and data\n layouts\n- Lazy loading and streaming json file processing with events based\n [ijson](https://github.com/ICRAR/ijson)\n- Encapsulation of calibration properties and values in Pydantic objects\n (automatic validation, serialization, schemes, etc.)\n- Type systems for CCP/XCP data types\n- XCPConfig for CCP/XCP configuration\n- XCPData for encapsulating calibration data with automatic dimension,\n data size validation, automatic codecs of hex, raw and numeric values\n- array view of table data as cached property with automatic type\n conversion and validation\n- Create calibration data object from a2l file\n- Get calibration data from downloaded json file\n\n## DBC\n\n- load dbc files with [cantools](https://github.com/cantools/cantools)\n- append new messages and signals to dbc files\n- GUI for interactively modifying dbc on the command line with\n [dbc-editor](https://gitlab.com/erzo/dbc-editor)\n\n## XCP (tbd)\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "can wrapper for applications",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/Binjian/candycan"
},
"split_keywords": [
"nbdev",
"jupyter",
"notebook",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "52d12c06d98ede4f6ab145e6f2b9407358358b9bbdefa44f4e77d4870a354121",
"md5": "4939b6feb8ec83496ef379dbca97a777",
"sha256": "5b5bad33ac864fa64f505a952970a4a7f5ee32e2980666724013ae551497ff58"
},
"downloads": -1,
"filename": "candycan-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4939b6feb8ec83496ef379dbca97a777",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 52279,
"upload_time": "2024-04-11T06:13:46",
"upload_time_iso_8601": "2024-04-11T06:13:46.791374Z",
"url": "https://files.pythonhosted.org/packages/52/d1/2c06d98ede4f6ab145e6f2b9407358358b9bbdefa44f4e77d4870a354121/candycan-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "78783fb0fd0332e1bc007dc7aad2dea764dd1a4f0fd798aa1714e37a7784fdb4",
"md5": "64041b7d206cddfff4e192ffe20ebda7",
"sha256": "bd6723187e4d20c3d311ce2078486b249953c29c91197c573a5f31d6c21c6d54"
},
"downloads": -1,
"filename": "candycan-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "64041b7d206cddfff4e192ffe20ebda7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 41320,
"upload_time": "2024-04-11T06:13:53",
"upload_time_iso_8601": "2024-04-11T06:13:53.026588Z",
"url": "https://files.pythonhosted.org/packages/78/78/3fb0fd0332e1bc007dc7aad2dea764dd1a4f0fd798aa1714e37a7784fdb4/candycan-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-11 06:13:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Binjian",
"github_project": "candycan",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "candycan"
}