Python
Python is a popular programming language for working with CAN/LIN data from the CANedge.
You can work with the CANedge data in Python in multiple ways:
- MF4 decoders: DBC decode your data to Parquet data lakes for large scale analysis
- python-can: Directly load MF4 log files in python-can for specialized use cases
Which method should you use?
If your goal is to analyse large amounts of DBC decoded CAN/LIN data (across many log files), we recommend using the MF4 decoders to create a Parquet data lake. This will make it easier to ‘abstract away’ the log file aspect of your data and enables ‘beyond-memory’ analyses. The Parquet data lake can also serve other purposes, such as dashboard visualization. See also our Parquet data lake section for plug & play automation work flows using the MF4 decoders.
For specialized use cases, python-can enables direct loading of CANedge MF4 files. This is useful if you wish to analyse the raw CAN/LIN frames, replay the data via a USB-to-CAN interface, selectively DBC decode messages/signals, inject conditional logic etc. The integration also offers extensions related to e.g. J1939, CANopen, ISO-TP, UDS, XCP and more[1].
[1] | If your data is compressed/encrypted/muxed, you can incorporate the MF4 to MF4 converter into your work flow using e.g. a Python subprocess step to create a decrypted/decompressed/demuxed MF4 file |