Skip to content

CAN BUS protocol description with code generation for the solar boat modules and applications

License

Notifications You must be signed in to change notification settings

ZeniteSolar/CAN_IDS

Repository files navigation

CAN_IDS

Test Status

CAN BUS protocol description with code generation for the solar boat modules and applications.

How it works

  • You programatically describe all modules and its messages using Python language.
  • The script exports a Javascript Object Notation file (.json).
  • The script exports a documentation (.html). (not implemented yet)
  • The script exports a C header file (.h) with all definitions.
  • The script exports a Python file (.py) with all encoders and decorders. (not implemented yet)
  • The script exports a JS file (.js) with all encoders and decorders. (not implemented yet)
  • The script exports a C source file (.c) with all encoders and decorders. (not implemented yet)
  • All the files are automatically released in this repository. (not implemented yet)
  • Dependabots automatically detects new versions for your repository. (not implemented yet)

Usage

Environment setup:

git clone https://github.com/ZeniteSolar/CAN_IDS
cd CAN_IDS
python -m venv .python_venv
source .python_venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

Generating .json and .h files:

python can_ids_generator.py 

Getting the last .json:

wget https://raw.githubusercontent.com/ZeniteSolar/CAN_IDS/master/can_ids.json

Getting the last .h:

wget https://raw.githubusercontent.com/ZeniteSolar/CAN_IDS/master/can_ids.h

Running tests:

sh test.sh