This docuement is new, so its much appreciated, if you ask question or give feedback. Don't hesitate to open an issue.
This document aims to provide a guideline for people wanting to contribute to the project. It does not aim to describe the project, please see the README.md for this.
Before diving into the code a good starting point for understanding what the project is about and what one of the use cases is, you can play with the live decode in javascript called tmbus. This will provide a good intuition for what the project is about. Go to the folder tests/rscada/test-frames
and copy the hex string into the input field of the tmbus website. See what the expected output is. Try to undestand the output. Change the input and see how the output changes. Note, becasue there is a check sum changing the input manually is not trivial and requires calculating the right checksum for the frame.
Code of conduct is taken from the rust project code of conduct.
There are a wide variety of resources available to learn rust. The following resources may be helpful:
## Understanding the code
The code and its function may be confusing at first. The following resouces may help you understand the code:
- m-bus website. This document is a good starting point for understanding the protocol. It is outdated but still useful starting point. The m-bus norm is mostly backwards compatible.
- Install the rust toolchain
- Install your favorite IDE such as vscode, intellij or neovim
- Install git and clone the repository
git clone git@github.com:maebli/m-bus-parser.git
- Run the tests
cargo test
and see if you can run the tests
- Fork the repository
- Create a branch
git checkout -b feature/your-feature
- Make your changes
- Run the tests
cargo test
- Commit your changes
git commit -m "feat: your feature"
- Push your changes
git push origin feature/your-feature
- Create a pull request