CAN Messages for Rivanna3. Messages from Rivanna2 are under the Rivanna2 branch.
- Clone this repo
- Install cantools by running
py -m pip install cantools- Note that you may need to use
pythonorpython3instead ofpy
- Note that you may need to use
- Install Kvaser Database Editor
- Version 3 recommended
- Use the Kvaser Database Editor to modify or create DBC files that define our CAN messages
- Generate the C CAN structs and the 'wrapper' header file for a DBC:
- Easiest: run
py generate.py {DBC file path}, which also runscantools generate_c_sourcefor you - To regenerate everything for every DBC file in the repo at once, run
py generate_all.py - Or, to run the original two steps yourself: first
cantools generate_c_source {path}, thenpy generate.py {DBC file path} --skip-c-source
- Easiest: run
- Add a message ID entry to
Common/include/CANStructMessageIDs.h