Thank you for your interest in contributing to this project! We welcome contributions from the community.
- Check existing issues before creating a new one
- Provide clear reproduction steps
- Include your compiler version and platform
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-improvement) - Make your changes following our coding standards
- Run all checks (
make pre-push) - Commit with a signed-off message (see DCO below)
- Submit a Pull Request to the
mainbranch
By submitting a contribution to this project, you certify that:
-
The contribution was created in whole or in part by you and you have the right to submit it under the Apache License 2.0; or
-
The contribution is based upon previous work that, to the best of your knowledge, is covered under an appropriate open source license and you have the right to submit that work with modifications; or
-
The contribution was provided directly to you by some other person who certified (1) or (2) and you have not modified it.
To sign off your commits, add -s to your git commit command:
git commit -s -m "Add new feature"This adds a Signed-off-by line to your commit message, indicating your
agreement with the DCO.
- NEVER use
mallocor heap allocation - NEVER use
memcpyon payload data - ALWAYS access data directly from raw buffers using provided macros
- Follow existing code formatting (use
make format) - All code must compile with by both GCC and Clang
- Add documentation for new macros and functions
- Include "Wire Format" visual tables for new message types
- Add tests for new functionality
- Ensure existing tests pass
- Run sanitizers before submitting
Understanding the rationale behind key architectural choices helps maintain consistency across contributions.
We use __attribute__((packed)) structs instead of memcpy for unaligned 64-bit loads. This compiles to a single instruction (MOV on x86, LDR on ARM) while maintaining alignment safety on strict architectures (ARM, SPARC). The compiler handles the complexity.
For extensible types like VehicleEventFlags, we read the maximum possible bits in one operation, then use pure arithmetic to extract fields. This avoids conditional I/O operations and reduces branch mispredictions in hot paths.
The public API uses macros rather than inline functions to ensure zero overhead and allow the compiler to fully optimize away unused code paths. Internal complexity is hidden behind J2735_INTERNAL_* prefixes that users should never call directly.
Each Python generator handles one concern (bit positions, offsets, accessors). This follows the Unix philosophy: small tools that do one thing well. Assembly into complete headers is a separate step, making reorganization trivial.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0. See the LICENSE file for details.
All new source files must include the standard Apache 2.0 header with SPDX identifier.