This project includes Python examples of how to process data from your CANedge CAN/LIN data loggers.
For most use cases we recommend to start with the below examples:
- data-processing: List specific log files, load them and DBC decode the data (local, S3)
For some use cases the below examples may be useful:
- asammdf-basics: Examples of using the asammdf API for processing MDF4 data
- s3-basics: Examples of how to download, upload or list specific objects on your server
- s3-events: Using AWS Lambda (for event based data processing)
- s3-events: Using MinIO notifications (for event based data processing)
- misc: Example of automating the use of the MDF4 converters
- misc: Basic e-mail sender function
- The scripts are tested using Python 3.7
- Most scripts are designed for Windows, but can easily be used/modified for Linux
- We recommend to install script requirements based on the
requirements.txtin each folder:
pip install -r requirements.txt
You can find MDF4 and DBC samples in the CANedge Intro docs.
- Some example folders contain their own
README.mdfiles for extra information - These example scripts are designed to be minimal and to help you get started - not for production
- Some S3 scripts use hardcoded credentials to ease testing - for production see e.g. this guide
There are many ways that you can work with the data from your CANedge devices. Most automation use cases involve fetching data from a specific device and time period - and DBC decoding this into a dataframe for further processing. Here, we recommend to look at the examples from the data-processing/ folder. These examples use our custom modules designed for use with the CANedge: The mdf_iter (for loading MDF4 data), the canedge_browser (for fetching specific data locally or from S3) and the can_decoder (for DBC decoding the data). In combination, these modules serve to support most use cases.
If you have needs that are not covered by these modules, you can check out the other examples using the asammdf API, the AWS/MinIO S3 API and our MDF4 converters.
If in doubt, contact us for sparring.
For details on installation and how to get started, see the documentation:
Feature suggestions, pull requests or questions are welcome!
You can contact us at CSS Electronics below: