Skip to main content

can wrapper for applications

Project description

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)

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

candycan-0.0.1.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

candycan-0.0.1-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

Details for the file candycan-0.0.1.tar.gz.

File metadata

  • Download URL: candycan-0.0.1.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for candycan-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bd6723187e4d20c3d311ce2078486b249953c29c91197c573a5f31d6c21c6d54
MD5 64041b7d206cddfff4e192ffe20ebda7
BLAKE2b-256 78783fb0fd0332e1bc007dc7aad2dea764dd1a4f0fd798aa1714e37a7784fdb4

See more details on using hashes here.

File details

Details for the file candycan-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: candycan-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 52.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for candycan-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b5bad33ac864fa64f505a952970a4a7f5ee32e2980666724013ae551497ff58
MD5 4939b6feb8ec83496ef379dbca97a777
BLAKE2b-256 52d12c06d98ede4f6ab145e6f2b9407358358b9bbdefa44f4e77d4870a354121

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